Commit 022d0c6e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 5cf7ebef f0a0fc10
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;