diff options
author | Perry Yuan <[email protected]> | 2024-04-25 16:07:53 +0800 |
---|---|---|
committer | Rafael J. Wysocki <[email protected]> | 2024-04-26 19:35:38 +0200 |
commit | 5547c0ebfc2efdab6ee93a7fd4d9c411ad87013e (patch) | |
tree | 5b31a602bb587cadadf0b2e80213191b462f655b /rust/helpers/workqueue.c | |
parent | 4fcfd1954ad305e331b6b4b62de2874fbae61394 (diff) |
cpufreq: amd-pstate: Unify computation of {max,min,nominal,lowest_nonlinear}_freq
Currently the amd_get_{min, max, nominal, lowest_nonlinear}_freq()
helpers computes the values of min_freq, max_freq, nominal_freq and
lowest_nominal_freq respectively afresh from
cppc_get_perf_caps(). This is not necessary as there are fields in
cpudata to cache these values.
To simplify this, add a single helper function named
amd_pstate_init_freq() which computes all these frequencies at once, and
caches it in cpudata.
Use the cached values everywhere else in the code.
Acked-by: Huang Rui <[email protected]>
Reviewed-by: Li Meng <[email protected]>
Tested-by: Dhananjay Ugwekar <[email protected]>
Co-developed-by: Gautham R. Shenoy <[email protected]>
Signed-off-by: Gautham R. Shenoy <[email protected]>
Signed-off-by: Perry Yuan <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'rust/helpers/workqueue.c')
0 files changed, 0 insertions, 0 deletions