cpufreq/amd-pstate: Show a warning when a CPU fails to setup
authorMario Limonciello <mario.limonciello@amd.com>
Wed, 11 Dec 2024 20:57:57 +0000 (14:57 -0600)
committerMario Limonciello <mario.limonciello@amd.com>
Thu, 6 Mar 2025 19:01:24 +0000 (13:01 -0600)
I came across a system that MSR_AMD_CPPC_CAP1 for some CPUs isn't
populated.  This is an unexpected behavior that is most likely a
BIOS bug. In the event it happens I'd like users to report bugs
to properly root cause and get this fixed.

Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Reviewed-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
drivers/cpufreq/amd-pstate.c

index 44318eb33463e5fee46ed24aafa0b6a4407a880f..29250638a2ac016228403dad932dc4b27db9979f 100644 (file)
@@ -1028,6 +1028,7 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
 free_cpudata2:
        freq_qos_remove_request(&cpudata->req[0]);
 free_cpudata1:
+       pr_warn("Failed to initialize CPU %d: %d\n", policy->cpu, ret);
        kfree(cpudata);
        return ret;
 }
@@ -1521,6 +1522,7 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)
        return 0;
 
 free_cpudata1:
+       pr_warn("Failed to initialize CPU %d: %d\n", policy->cpu, ret);
        kfree(cpudata);
        return ret;
 }