Skip to content

Commit b26ffbf

Browse files
torvic9rafaeljw
authored andcommitted
cpufreq: amd-pstate: Fix min_perf assignment in amd_pstate_adjust_perf()
In the function amd_pstate_adjust_perf(), the 'min_perf' variable is set to 'highest_perf' instead of 'lowest_perf'. Fixes: 1d215f0 ("cpufreq: amd-pstate: Add fast switch function for AMD P-State") Reported-by: Oleksandr Natalenko <[email protected]> Reviewed-by: Perry Yuan <[email protected]> Signed-off-by: Tor Vic <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> Cc: 6.1+ <[email protected]> # 6.1+ Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 4c7dbd8 commit b26ffbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ static void amd_pstate_adjust_perf(unsigned int cpu,
577577
if (target_perf < capacity)
578578
des_perf = DIV_ROUND_UP(cap_perf * target_perf, capacity);
579579

580-
min_perf = READ_ONCE(cpudata->highest_perf);
580+
min_perf = READ_ONCE(cpudata->lowest_perf);
581581
if (_min_perf < capacity)
582582
min_perf = DIV_ROUND_UP(cap_perf * _min_perf, capacity);
583583

0 commit comments

Comments
 (0)