cpufreq: amd-pstate: add ACPI disabled check in acpi_cpc_valid()
Subsystems (4)
Perry Yuan
reviewerPATCH v2 11/14 cpufreq: amd-pstate: add ACPI disabled check in acpi_cpc_valid()
Add acpi function check in case ACPI is not enabled, that will cause pstate driver failed to call cppc acpi to change perf or update epp value for shared memory solution processors.
When CPPC or ACPI is invalid, warning log will be needed to tell user that AMD pstate driver failed to load and what is wrong.
Signed-off-by Perry Yuan <[email protected]>
--- drivers/acpi/cppc_acpi.c | 3 +++ drivers/cpufreq/amd-pstate.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/acpi/cppc_acpi.c +3 -0
@@ -424,6 +424,9 @@ bool acpi_cpc_valid(void)struct cpc_desc *cpc_ptr;int cpu; +if (acpi_disabled) +return false; +for_each_present_cpu (cpu) { cpc_ptr =per_cpu (cpc_desc_ptr, cpu);if (!cpc_ptr)
drivers/cpufreq/amd-pstate.c +1 -1
@@ -684,7 +684,7 @@ static int __init amd_pstate_init(void)return -ENODEV ;if (!acpi_cpc_valid ()) { -pr_debug ("the _CPC object is not present in SBIOS\n" ); +pr_warn_once ("the _CPC object is not present in SBIOS or ACPI disabled\n" );return -ENODEV ; }
Signature · 1 line
2.25.1