]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cpufreq/amd-pstate: Push adjust_perf vfunc init into cpu_init
authorMario Limonciello <mario.limonciello@amd.com>
Mon, 28 Oct 2024 14:55:41 +0000 (09:55 -0500)
committerMario Limonciello <mario.limonciello@amd.com>
Tue, 29 Oct 2024 13:31:57 +0000 (08:31 -0500)
commit3ac757e8db3deacc8058912d55efd1390f985d80
tree69f74e024d746c5cb99e9d6766682bbbff8beee7
parenta6960e6b1b0e2cb268f427a99040c408a8d10665
cpufreq/amd-pstate: Push adjust_perf vfunc init into cpu_init

As the driver can be changed in and out of different modes it's possible
that adjust_perf is assigned when it shouldn't be.

This could happen if an MSR design is started up in passive mode and then
switches to active mode.

To solve this explicitly clear `adjust_perf` in amd_pstate_epp_cpu_init().

Tested-by: Klara Modin <klarasmodin@gmail.com>
Tested-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Link: https://lore.kernel.org/r/20241028145542.1739160-1-superm1@kernel.org
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
drivers/cpufreq/amd-pstate.c