]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: intel_pstate: Use HWP if enabled by platform firmware
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 21 Apr 2021 17:40:56 +0000 (19:40 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 10 May 2021 11:22:39 +0000 (13:22 +0200)
commit090a64efc23287818590283c69bc1ef8cde3d06a
tree1949d48ad2f06a1e8f10a1fccf1194ba82403987
parent78f0a5f86683713bf30eae653c023ab078a37264
cpufreq: intel_pstate: Use HWP if enabled by platform firmware

It turns out that there are systems where HWP is enabled during
initialization by the platform firmware (BIOS), but HWP EPP support
is not advertised.

After commit bbadaf55c399 ("cpufreq: intel_pstate: Avoid enabling HWP
if EPP is not supported") intel_pstate refuses to use HWP on those
systems, but the fallback PERF_CTL interface does not work on them
either because of enabled HWP, and once enabled, HWP cannot be
disabled.  Consequently, the users of those systems cannot control
CPU performance scaling.

Address this issue by making intel_pstate use HWP unconditionally if
it is enabled already when the driver starts.

Fixes: bbadaf55c399 ("cpufreq: intel_pstate: Avoid enabling HWP if EPP is not supported")
Reported-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Tested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: 5.9+ <stable@vger.kernel.org> # 5.9+
drivers/cpufreq/intel_pstate.c