linux/arch/x86/kernel/cpu
Thomas Gleixner 2066f00e5b x86/topology: Implement topology_is_core_online() to address SMT regression
Christian reported that commit a430c11f40 ("intel_idle: Rescan "dead" SMT
siblings during initialization") broke the use case in which both 'nosmt'
and 'maxcpus' are on the kernel command line because it onlines primary
threads, which were offline due to the maxcpus limit.

The initially proposed fix to skip primary threads in the loop is
inconsistent. While it prevents the primary thread to be onlined, it then
onlines the corresponding hyperthread(s), which does not really make sense.

The CPU iterator in cpuhp_smt_enable() contains a check which excludes all
threads of a core, when the primary thread is offline. The default
implementation is a NOOP and therefore not effective on x86.

Implement topology_is_core_online() on x86 to address this issue. This
makes the behaviour consistent between x86 and PowerPC.

Fixes: a430c11f40 ("intel_idle: Rescan "dead" SMT siblings during initialization")
Fixes: f694481b1d ("ACPI: processor: Rescan "dead" SMT siblings during initialization")
Closes: https://lore.kernel.org/linux-pm/724616a2-6374-4ba3-8ce3-ea9c45e2ae3b@arm.com/
Reported-by: Christian Loehle <christian.loehle@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
Tested-by: Christian Loehle <christian.loehle@arm.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/12740505.O9o76ZdvQC@rafael.j.wysocki
2025-09-22 21:25:36 +02:00
..
mce x86/mce: Make sure CMCI banks are cleared during shutdown on Intel 2025-06-28 12:45:48 +02:00
microcode x86/microcode/AMD: Handle the case of no BIOS microcode 2025-08-27 10:24:10 +02:00
mtrr
resctrl x86,fs/resctrl: Remove inappropriate references to cacheinfo in the resctrl subsystem 2025-06-16 21:06:12 +02:00
sgx mm: update architecture and driver code to use vm_flags_t 2025-07-09 22:42:14 -07:00
.gitignore
Makefile
acrn.c
amd.c x86/CPU/AMD: Ignore invalid reset reason value 2025-08-18 16:36:59 +02:00
amd_cache_disable.c
aperfmperf.c
bugs.c Mitigate VMSCAPE issue with indirect branch predictor flushes 2025-09-10 20:52:16 -07:00
bus_lock.c
cacheinfo.c x86/cacheinfo: Rename CPUID(0x2) descriptors iterator parameter 2025-05-16 10:49:55 +02:00
centaur.c
common.c x86/vmscape: Add old Intel CPUs to affected list 2025-08-29 15:28:52 -07:00
cpu.h
cpuid-deps.c
cpuid_0x2_table.c
cyrix.c
debugfs.c
feat_ctl.c
hygon.c x86/cpu/hygon: Add missing resctrl_cpu_detect() in bsp_init helper 2025-08-18 12:09:26 +02:00
hypervisor.c
intel.c x86/cpu/intel: Fix the constant_tsc model check for Pentium 4 2025-08-25 08:23:37 -07:00
intel_epb.c
match.c
mkcapflags.sh
mshyperv.c
perfctr-watchdog.c
powerflags.c
proc.c
rdrand.c
scattered.c x86/sev: Evict cache lines during SNP memory validation 2025-08-06 19:17:22 +02:00
topology.c x86/topology: Implement topology_is_core_online() to address SMT regression 2025-09-22 21:25:36 +02:00
topology.h
topology_amd.c x86/cpu/topology: Always try cpu_parse_topology_ext() on AMD/Hygon 2025-09-08 11:37:49 +02:00
topology_common.c
topology_ext.c
transmeta.c
tsx.c
umc.c
umwait.c
vmware.c
vortex.c
zhaoxin.c