]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cpufreq/amd-pstate: Reorder notifier unregistration and floor perf reset
authorK Prateek Nayak <kprateek.nayak@amd.com>
Fri, 8 May 2026 05:17:46 +0000 (05:17 +0000)
committerMario Limonciello (AMD) <superm1@kernel.org>
Fri, 8 May 2026 05:30:50 +0000 (00:30 -0500)
commitf3acf7ff113007557538b278ccb0e4ab7ae513ea
treef822f559689ebe8b99b77deab633acbf23b06185
parentc5eed6ddc757e477f52b3d99bfde9e59975c72ca
cpufreq/amd-pstate: Reorder notifier unregistration and floor perf reset

An active power supply notifier can race with amd_pstate_epp_cpu_exit()
trying to reset the floor perf and can overwrite the floor perf set in
MSR_AMD_CPPC_REQ.

Unregister the notifier before setting the floor perf to prevent the
rare race.

Fixes: e30ca6dd5345 ("cpufreq/amd-pstate: Add dynamic energy performance preference")
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com>
Link: https://lore.kernel.org/r/20260508051748.10484-5-kprateek.nayak@amd.com
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
drivers/cpufreq/amd-pstate.c