From a2a9d1850060e5d995136561d76e81d61414f076 Mon Sep 17 00:00:00 2001 From: Perry Yuan Date: Mon, 15 Aug 2022 00:35:48 +0800 Subject: ACPI: CPPC: Add ACPI disabled check to acpi_cpc_valid() Make acpi_cpc_valid() check if ACPI is disabled, so that its callers don't need to check that separately. This will also cause the AMD pstate driver to refuse to load right away when ACPI is disabled. Also update the warning message in amd_pstate_init() to mention the ACPI disabled case for completeness. Signed-off-by: Perry Yuan [ rjw: Subject edits, new changelog ] Signed-off-by: Rafael J. Wysocki --- drivers/base/arch_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/base') diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c index 0424b59b695e..a9ff81d3a889 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -353,7 +353,7 @@ void topology_init_cpu_capacity_cppc(void) struct cppc_perf_caps perf_caps; int cpu; - if (likely(acpi_disabled || !acpi_cpc_valid())) + if (likely(!acpi_cpc_valid())) return; raw_capacity = kcalloc(num_possible_cpus(), sizeof(*raw_capacity), -- cgit v1.2.3-58-ga151