]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
cpufreq: intel_pstate: Clear HWP desired on suspend/shutdown and offline
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 3 Nov 2021 18:43:47 +0000 (19:43 +0100)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:48:36 +0000 (09:48 +0100)
commitc1431625ed0c0f481ed9bd7be1bbaff01b29a20f
treeeacb2b6c9fa3c44533adf9c302e88b9d7851ca7d
parent59796c91d5a178392c8e3301dbab6cafabc0dfec
cpufreq: intel_pstate: Clear HWP desired on suspend/shutdown and offline

BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit dbea75fe18f60e364de6d994fc938a24ba249d81 ]

Commit a365ab6b9dfb ("cpufreq: intel_pstate: Implement the
->adjust_perf() callback") caused intel_pstate to use nonzero HWP
desired values in certain usage scenarios, but it did not prevent
them from being leaked into the confugirations in which HWP desired
is expected to be 0.

The failing scenarios are switching the driver from the passive
mode to the active mode and starting a new kernel via kexec() while
intel_pstate is running in the passive mode.

To address this issue, ensure that HWP desired will be cleared on
offline and suspend/shutdown.

Fixes: a365ab6b9dfb ("cpufreq: intel_pstate: Implement the ->adjust_perf() callback")
Reported-by: Julia Lawall <julia.lawall@inria.fr>
Tested-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/cpufreq/intel_pstate.c