Skip to content

Commit f0a0fc1

Browse files
DougSmythiesrafaeljw
authored andcommitted
cpufreq: intel_pstate: fix pstate limits enforcement for adjust_perf call back
There is a loophole in pstate limit clamping for the intel_cpufreq CPU frequency scaling driver (intel_pstate in passive mode), schedutil CPU frequency scaling governor, HWP (HardWare Pstate) control enabled, when the adjust_perf call back path is used. Fix it. Fixes: a365ab6 cpufreq: intel_pstate: Implement the ->adjust_perf() callback Signed-off-by: Doug Smythies <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent b401b62 commit f0a0fc1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/cpufreq/intel_pstate.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2987,6 +2987,9 @@ static void intel_cpufreq_adjust_perf(unsigned int cpunum,
29872987
if (min_pstate < cpu->min_perf_ratio)
29882988
min_pstate = cpu->min_perf_ratio;
29892989

2990+
if (min_pstate > cpu->max_perf_ratio)
2991+
min_pstate = cpu->max_perf_ratio;
2992+
29902993
max_pstate = min(cap_pstate, cpu->max_perf_ratio);
29912994
if (max_pstate < min_pstate)
29922995
max_pstate = min_pstate;

0 commit comments

Comments
 (0)