summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-02-28 23:18:31 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2024-02-28 23:18:31 +0300
commit022d0c6e03171afef24a80f1dc8bb4edb7b64417 (patch)
treec18c1711a044f1d2938ff997f5b2d582182c16ce /drivers
parent5cf7ebef02e434c75bf8dc72e89dfc50c5bb41b0 (diff)
parentf0a0fc10abb062d122db5ac4ed42f6d1ca342649 (diff)
downloadlinux-022d0c6e03171afef24a80f1dc8bb4edb7b64417.tar.xz
Merge tag 'pm-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fix from Rafael Wysocki: "Fix a latent bug in the intel-pstate cpufreq driver that has been exposed by the recent schedutil governor changes (Doug Smythies)" * tag 'pm-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: intel_pstate: fix pstate limits enforcement for adjust_perf call back
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cpufreq/intel_pstate.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index ca94e60e705a..79619227ea51 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -2987,6 +2987,9 @@ static void intel_cpufreq_adjust_perf(unsigned int cpunum,
if (min_pstate < cpu->min_perf_ratio)
min_pstate = cpu->min_perf_ratio;
+ if (min_pstate > cpu->max_perf_ratio)
+ min_pstate = cpu->max_perf_ratio;
+
max_pstate = min(cap_pstate, cpu->max_perf_ratio);
if (max_pstate < min_pstate)
max_pstate = min_pstate;