Since commit 9dfd13f80c85 ("cpufreq/amd-pstate: Toggle auto_sel in active mode on shared memory systems"), shmem_init_perf() programs AUTONOMOUS_SELECTION_ENABLE unconditionally, including in active mode. On platforms implementing CPPC v2 and below, _CPC reports Autonomous Selection Enable as a plain integer rather than as a register descriptor. Such a field is a read-only capability flag: cppc_get_reg_val() reads it back successfully (the firmware reports it as enabled), while cppc_set_reg_val() rejects the write with -EOPNOTSUPP because the entry is not an ACPI_TYPE_BUFFER. shmem_init_perf() propagates that error, so every amd_pstate_epp_cpu_init() fails, cpufreq_register_driver() ends up with an empty policy list and returns -ENODEV, and amd-pstate refuses to load at all: amd_pstate: failed to set auto_sel, ret: -95 amd_pstate: Failed to initialize CPU 0: -95 ... amd_pstate: failed to register with return -19 Failing to write auto_sel is not fatal: the register is either already enabled, as reported by the cppc_get_auto_sel() call right above, or not writable at all, and active mode worked in both cases before the offending commit. Downgrade the failure to a warning and let initialization continue, matching how the cppc_get_auto_sel() failure is handled. Fixes: 9dfd13f80c85 ("cpufreq/amd-pstate: Toggle auto_sel in active mode on shared memory systems") Cc: stable@vger.kernel.org Tested-by: LFRon Signed-off-by: Wentao Guan --- drivers/cpufreq/amd-pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index 80d99ba1902c9..3657c5cccd4d8 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -538,5 +538,5 @@ static int shmem_init_perf(struct amd_cpudata *cpudata) if (ret) pr_warn("failed to set auto_sel, ret: %d\n", ret); - return ret; + return 0; }