Commit 0fce7587 authored by Gautham R. Shenoy's avatar Gautham R. Shenoy Committed by Rafael J. Wysocki
Browse files

ACPI: CPPC: Limit perf ctrs in PCC check only to online CPUs



per_cpu(cpc_desc_ptr, cpu) object is initialized for only the online
CPU via acpi_soft_cpu_online() --> __acpi_processor_start() -->
acpi_cppc_processor_probe().

However the function cppc_perf_ctrs_in_pcc() checks if the CPPC
perf-ctrs are in a PCC region for all the present CPUs, which breaks
when the kernel is booted with "nosmt=force".

Hence, limit the check only to the online CPUs.

Fixes: ae2df912 ("ACPI: CPPC: Disable FIE if registers in PCC regions")
Reviewed-by: default avatar"Mario Limonciello (AMD) (kernel.org)" <superm1@kernel.org>
Signed-off-by: default avatarGautham R. Shenoy <gautham.shenoy@amd.com>
Link: https://patch.msgid.link/20251107074145.2340-5-gautham.shenoy@amd.com


Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 8821c8e8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1435,7 +1435,7 @@ bool cppc_perf_ctrs_in_pcc(void)
{
	int cpu;

	for_each_present_cpu(cpu) {
	for_each_online_cpu(cpu) {
		struct cpc_register_resource *ref_perf_reg;
		struct cpc_desc *cpc_desc;