]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cpufreq/amd-pstate: Call cppc_set_auto_sel() only for online CPUs
authorGautham R. Shenoy <gautham.shenoy@amd.com>
Fri, 7 Nov 2025 07:41:45 +0000 (13:11 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 12:54:56 +0000 (13:54 +0100)
commit37d511e84913930c472c4cbba83ba39024a94e88
tree3520c7c3a7a326363a28079bbc5ee1b8a36b54ae
parent90138ed922e5745ab448912482c61cd82dd2f911
cpufreq/amd-pstate: Call cppc_set_auto_sel() only for online CPUs

[ Upstream commit bb31fef0d03ed17d587b40e3458786be408fb9df ]

amd_pstate_change_mode_without_dvr_change() calls cppc_set_auto_sel()
for all the present CPUs.

However, this callpath eventually calls cppc_set_reg_val() which
accesses the per-cpu cpc_desc_ptr object. This object is initialized
only for online CPUs via acpi_soft_cpu_online() -->
__acpi_processor_start() --> acpi_cppc_processor_probe().

Hence, restrict calling cppc_set_auto_sel() to only the online CPUs.

Fixes: 3ca7bc818d8c ("cpufreq: amd-pstate: Add guided mode control support via sysfs")
Suggested-by: Mario Limonciello (AMD) (kernel.org) <superm1@kernel.org>
Signed-off-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cpufreq/amd-pstate.c