Skip to content

Commit 2aeca6b

Browse files
superm1rafaeljw
authored andcommitted
ACPI: CPPC: Check present CPUs for determining _CPC is valid
As this is a static check, it should be based upon what is currently present on the system. This makes probeing more deterministic. While local APIC flags field (lapic_flags) of cpu core in MADT table is 0, then the cpu core won't be enabled. In this case, _CPC won't be found in this core, and return back to _CPC invalid with walking through possible cpus (include disable cpus). This is not expected, so switch to check present CPUs instead. Reported-by: Jinzhou Su <Jinzhou.Su@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent a2c8f92 commit 2aeca6b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/acpi/cppc_acpi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ bool acpi_cpc_valid(void)
413413
struct cpc_desc *cpc_ptr;
414414
int cpu;
415415

416-
for_each_possible_cpu(cpu) {
416+
for_each_present_cpu(cpu) {
417417
cpc_ptr = per_cpu(cpc_desc_ptr, cpu);
418418
if (!cpc_ptr)
419419
return false;

0 commit comments

Comments
 (0)