linux/arch/x86
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
..
boot - Remove a transitional asm/cpuid.h header which was added only as 2025-08-17 06:53:15 -07:00
coco - Remove a transitional asm/cpuid.h header which was added only as 2025-08-17 06:53:15 -07:00
configs x86/kconfig/32: Refresh defconfig 2025-07-14 16:25:46 +02:00
crypto This update includes the following changes: 2025-07-31 09:45:28 -07:00
entry hardening updates for v6.17-rc1 2025-07-28 17:16:12 -07:00
events perf/x86/intel/uncore: Add iMC freerunning for Panther Lake 2025-07-09 13:40:20 +02:00
hyperv x86/hyperv: Expose hv_map_msi_interrupt() 2025-07-15 06:24:16 +00:00
ia32
include x86/topology: Implement topology_is_core_online() to address SMT regression 2025-09-22 21:25:36 +02:00
kernel x86/topology: Implement topology_is_core_online() to address SMT regression 2025-09-22 21:25:36 +02:00
kvm KVM x86 fix for 6.17-rcN 2025-09-17 19:45:02 +02:00
lib - Add helpers for WB{NO,}INVD with the purpose of using them in KVM and thus 2025-07-29 16:55:29 -07:00
math-emu
mm x86/mm/64: define ARCH_PAGE_TABLE_SYNC_MASK and arch_sync_kernel_mappings() 2025-08-27 22:45:44 -07:00
net bpf: Move bpf_jit_get_prog_name() to core.c 2025-07-26 21:26:51 +02:00
pci pci-v6.16-changes 2025-06-04 11:26:17 -07:00
platform - Map the SNP calling area pages too so that OVMF EFI fw can issue SVSM 2025-07-29 17:18:46 -07:00
power x86/smp: PM/hibernate: Split arch_resume_nosmt() 2025-06-07 14:22:56 +02:00
purgatory Crypto library updates for 6.17 2025-07-28 17:58:52 -07:00
ras
realmode - The 11 patch series "Add folio_mk_pte()" from Matthew Wilcox 2025-05-31 15:44:16 -07:00
tools x86/tools: insn_sanity.c: Emit standard build success messages 2025-07-14 17:04:43 +02:00
um Mostly cleanups, except: 2025-07-29 20:31:45 -07:00
video
virt x86/virt/tdx: Avoid indirect calls to TDX assembly functions 2025-06-10 12:32:52 -07:00
xen x86/xen/msr: Fix uninitialized variable 'err' 2025-05-21 08:44:31 +02:00
.gitignore
Kbuild
Kconfig x86/Kconfig: Reenable PTDUMP on i386 2025-09-22 14:40:17 +02:00
Kconfig.assembler Core x86 updates for v6.16: 2025-05-26 16:04:17 -07:00
Kconfig.cpu
Kconfig.cpufeatures x86/mm/64: Make 5-level paging support unconditional 2025-05-17 10:38:16 +02:00
Kconfig.debug
Makefile Add the CONFIG_X86_NATIVE_CPU=y build option to locally optimize the kernel 2025-05-26 21:41:14 -07:00
Makefile.um
Makefile_32.cpu