summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/sh-cpufreq.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-01-05 19:20:29 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-01-07 17:34:32 +0100
commit17ffd35809c34b9564edb10727d02eb62958ba5c (patch)
treef093a52317a2b579076abe1403c3dd285b28abbb /drivers/cpufreq/sh-cpufreq.c
parentLinux 5.11-rc2 (diff)
downloadlinux-17ffd35809c34b9564edb10727d02eb62958ba5c.tar.xz
linux-17ffd35809c34b9564edb10727d02eb62958ba5c.zip
cpufreq: intel_pstate: Use HWP capabilities in intel_cpufreq_adjust_perf()
If turbo P-states cannot be used, either due to the configuration of the processor, or because intel_pstate is not allowed to used them, the maximum available P-state with HWP enabled corresponds to the HWP_CAP.GUARANTEED value which is not static. It can be adjusted by an out-of-band agent or during an Intel Speed Select performance level change, so long as it remains less than or equal to HWP_CAP.MAX. However, if turbo P-states cannot be used, intel_cpufreq_adjust_perf() always uses pstate.max_pstate (set during the initialization of the driver only) as the maximum available P-state, so it may miss a change of the HWP_CAP.GUARANTEED value. Prevent that from happening by modifyig intel_cpufreq_adjust_perf() to always read the "guaranteed" and "maximum turbo" performance levels from the cached HWP_CAP value. Fixes: a365ab6b9dfb ("cpufreq: intel_pstate: Implement the ->adjust_perf() callback") Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Diffstat (limited to 'drivers/cpufreq/sh-cpufreq.c')
0 files changed, 0 insertions, 0 deletions