Skip to content

Commit 6dd3b8a

Browse files
gautshenrafaeljw
authored andcommitted
ACPI: CPPC: Check _CPC validity for only the online CPUs
per_cpu(cpc_desc_ptr, cpu) object is initialized for only the online CPUs via acpi_soft_cpu_online() --> __acpi_processor_start() --> acpi_cppc_processor_probe(). However the function acpi_cpc_valid() checks for the validity of the _CPC object for all the present CPUs. This breaks when the kernel is booted with "nosmt=force". Hence check the validity of the _CPC objects of only the online CPUs. Fixes: 2aeca6b ("ACPI: CPPC: Check present CPUs for determining _CPC is valid") Reported-by: Christopher Harris <chris.harris79@gmail.com> Closes: https://lore.kernel.org/lkml/CAM+eXpdDT7KjLV0AxEwOLkSJ2QtrsvGvjA2cCHvt1d0k2_C4Cw@mail.gmail.com/ Suggested-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: "Mario Limonciello (AMD) (kernel.org)" <superm1@kernel.org> Tested-by: Chrisopher Harris <chris.harris79@gmail.com> Signed-off-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Link: https://patch.msgid.link/20251107074145.2340-3-gautham.shenoy@amd.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 4fe5934 commit 6dd3b8a

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
@@ -460,7 +460,7 @@ bool acpi_cpc_valid(void)
460460
if (acpi_disabled)
461461
return false;
462462

463-
for_each_present_cpu(cpu) {
463+
for_each_online_cpu(cpu) {
464464
cpc_ptr = per_cpu(cpc_desc_ptr, cpu);
465465
if (!cpc_ptr)
466466
return false;

0 commit comments

Comments
 (0)