cpufreq: intel_pstate: Refuse to turn off with HWP enabled
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 20 Aug 2020 15:40:02 +0000 (17:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2020 11:55:36 +0000 (13:55 +0200)
commit4b65cda38fc88c2796da2b19007f8f62447c8d85
treee6ead21f0cd7c9fbcbeb28f5b19d00c99904c41f
parent5412a6f03aca512618921a9dbf02310424d0048f
cpufreq: intel_pstate: Refuse to turn off with HWP enabled

[ Upstream commit 43298db3009f06fe5c69e1ca8b6cfc2565772fa1 ]

After commit f6ebbcf08f37 ("cpufreq: intel_pstate: Implement passive
mode with HWP enabled") it is possible to change the driver status
to "off" via sysfs with HWP enabled, which effectively causes the
driver to unregister itself, but HWP remains active and it forces the
minimum performance, so even if another cpufreq driver is loaded,
it will not be able to control the CPU frequency.

For this reason, make the driver refuse to change the status to
"off" with HWP enabled.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cpufreq/intel_pstate.c