Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'x86-urgent-2025-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
"Fix a CPU topology code regression that caused the mishandling of
certain boot command line options, and re-enable CONFIG_PTDUMP on i386
that was mistakenly turned off in the Kconfig"

* tag 'x86-urgent-2025-09-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/topology: Implement topology_is_core_online() to address SMT regression
x86/Kconfig: Reenable PTDUMP on i386

+24 -1
+1 -1
arch/x86/Kconfig
··· 26 26 depends on 64BIT 27 27 # Options that are inherently 64-bit kernel only: 28 28 select ARCH_HAS_GIGANTIC_PAGE 29 - select ARCH_HAS_PTDUMP 30 29 select ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS 31 30 select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 32 31 select ARCH_SUPPORTS_PER_VMA_LOCK ··· 98 99 select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE 99 100 select ARCH_HAS_PMEM_API if X86_64 100 101 select ARCH_HAS_PREEMPT_LAZY 102 + select ARCH_HAS_PTDUMP 101 103 select ARCH_HAS_PTE_SPECIAL 102 104 select ARCH_HAS_HW_PTE_YOUNG 103 105 select ARCH_HAS_NONLEAF_PMD_YOUNG if PGTABLE_LEVELS > 2
+10
arch/x86/include/asm/topology.h
··· 231 231 } 232 232 #define topology_is_primary_thread topology_is_primary_thread 233 233 234 + int topology_get_primary_thread(unsigned int cpu); 235 + 236 + static inline bool topology_is_core_online(unsigned int cpu) 237 + { 238 + int pcpu = topology_get_primary_thread(cpu); 239 + 240 + return pcpu >= 0 ? cpu_online(pcpu) : false; 241 + } 242 + #define topology_is_core_online topology_is_core_online 243 + 234 244 #else /* CONFIG_SMP */ 235 245 static inline int topology_phys_to_logical_pkg(unsigned int pkg) { return 0; } 236 246 static inline int topology_max_smt_threads(void) { return 1; }
+13
arch/x86/kernel/cpu/topology.c
··· 372 372 return topo_unit_count(lvlid, at_level, apic_maps[which_units].map); 373 373 } 374 374 375 + #ifdef CONFIG_SMP 376 + int topology_get_primary_thread(unsigned int cpu) 377 + { 378 + u32 apic_id = cpuid_to_apicid[cpu]; 379 + 380 + /* 381 + * Get the core domain level APIC id, which is the primary thread 382 + * and return the CPU number assigned to it. 383 + */ 384 + return topo_lookup_cpuid(topo_apicid(apic_id, TOPO_CORE_DOMAIN)); 385 + } 386 + #endif 387 + 375 388 #ifdef CONFIG_ACPI_HOTPLUG_CPU 376 389 /** 377 390 * topology_hotplug_apic - Handle a physical hotplugged APIC after boot