Skip to content

Commit a9ba0fd

Browse files
committed
cpufreq/amd-pstate: Show a warning when a CPU fails to setup
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 <[email protected]> Reviewed-by: Dhananjay Ugwekar <[email protected]> Signed-off-by: Mario Limonciello <[email protected]>
1 parent b7a4115 commit a9ba0fd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,7 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
10281028
free_cpudata2:
10291029
freq_qos_remove_request(&cpudata->req[0]);
10301030
free_cpudata1:
1031+
pr_warn("Failed to initialize CPU %d: %d\n", policy->cpu, ret);
10311032
kfree(cpudata);
10321033
return ret;
10331034
}
@@ -1521,6 +1522,7 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)
15211522
return 0;
15221523

15231524
free_cpudata1:
1525+
pr_warn("Failed to initialize CPU %d: %d\n", policy->cpu, ret);
15241526
kfree(cpudata);
15251527
return ret;
15261528
}

0 commit comments

Comments
 (0)