linux/arch/x86/kernel/acpi
Gautham R. Shenoy 4fe5934db4 ACPI: CPPC: Detect preferred core availability on online CPUs
Commit 279f838a61 ("x86/amd: Detect preferred cores in
amd_get_boost_ratio_numerator()") introduced the ability to detect the
preferred core on AMD platforms by checking if there at least two
distinct highest_perf values.

However, it uses for_each_present_cpu() to iterate through all the
CPUs in the platform, which is problematic when the kernel is booted
with "nosmt=force" commandline option.

Hence limit the search to only the online CPUs.

Fixes: 279f838a61 ("x86/amd: Detect preferred cores in amd_get_boost_ratio_numerator()")
Reported-by: Christopher Harris <chris.harris79@gmail.com>
Closes: https://lore.kernel.org/lkml/CAM+eXpdDT7KjLV0AxEwOLkSJ2QtrsvGvjA2cCHvt1d0k2_C4Cw@mail.gmail.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-2-gautham.shenoy@amd.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-11-07 18:37:42 +01:00
..
apei.c x86/mce, cper: Pass x86 CPER through the MCA handling chain 2020-11-21 12:05:41 +01:00
boot.c x86/acpi: Don't limit CPUs to 1 for Xen PV guests due to disabled ACPI 2025-04-07 16:35:21 +02:00
cppc.c ACPI: CPPC: Detect preferred core availability on online CPUs 2025-11-07 18:37:42 +01:00
cstate.c x86/acpi/cstate: Remove open coded check for cpu_feature_enabled() 2025-09-22 19:16:51 +02:00
madt_playdead.S x86/cfi: Clean up linkage 2025-02-14 10:32:05 +01:00
madt_wakeup.c arch/x86: Provide the CPU number in the wakeup AP callback 2025-05-23 16:30:56 +00:00
Makefile x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method 2024-06-17 17:46:25 +02:00
sleep.c x86/msr: Add explicit includes of <asm/msr.h> 2025-05-02 10:23:47 +02:00
sleep.h x86/acpi: Remove unused extern declaration acpi_copy_wakeup_routine() 2023-06-21 10:57:54 -07:00
wakeup_32.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
wakeup_64.S x86/cfi: Clean up linkage 2025-02-14 10:32:05 +01:00