twx-linux/arch
Thomas Gleixner 5e25eb25da x86/topology: Handle the !APIC case gracefully
If there is no local APIC enumerated and registered then the topology
bitmaps are empty. Therefore, topology_init_possible_cpus() will die with
a division by zero exception.

Prevent this by registering a fake APIC id to populate the topology
bitmap. This also allows to use all topology query interfaces
unconditionally. It does not affect the actual APIC code because either
the local APIC address was not registered or no local APIC could be
detected.

Fixes: f1f758a80516 ("x86/topology: Add a mechanism to track topology via APIC IDs")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20240322185305.242709302@linutronix.de
2024-03-23 12:35:56 +01:00
..
alpha asm-generic updates for 6.9 2024-03-12 10:56:28 -07:00
arc - Sumanth Korikkar has taught s390 to allocate hotplug-time page frames 2024-03-14 17:43:30 -07:00
arm This update includes the following changes: 2024-03-15 14:46:54 -07:00
arm64 Revert "KVM: arm64: Snapshot all non-zero RES0/RES1 sysreg fields for later checking" 2024-03-15 17:50:22 -07:00
csky - Sumanth Korikkar has taught s390 to allocate hotplug-time page frames 2024-03-14 17:43:30 -07:00
hexagon asm-generic updates for 6.9 2024-03-12 10:56:28 -07:00
loongarch S390: 2024-03-15 13:03:13 -07:00
m68k - Sumanth Korikkar has taught s390 to allocate hotplug-time page frames 2024-03-14 17:43:30 -07:00
microblaze arch: define CONFIG_PAGE_SIZE_*KB on all architectures 2024-03-06 19:29:09 +01:00
mips S390: 2024-03-15 13:03:13 -07:00
nios2 - Sumanth Korikkar has taught s390 to allocate hotplug-time page frames 2024-03-14 17:43:30 -07:00
openrisc OpenRISC updates for 6.9 2024-03-14 15:53:10 -07:00
parisc parisc architecture updates and fixes for kernel v6.9-rc1: 2024-03-16 16:25:20 -07:00
powerpc powerpc updates for 6.9 2024-03-15 17:53:48 -07:00
riscv S390: 2024-03-15 13:03:13 -07:00
s390 S390: 2024-03-15 13:03:13 -07:00
sh - Sumanth Korikkar has taught s390 to allocate hotplug-time page frames 2024-03-14 17:43:30 -07:00
sparc This includes the following changes related to sparc for v6.9: 2024-03-15 12:47:21 -07:00
um Devicetree updates for v6.9: 2024-03-15 12:37:59 -07:00
x86 x86/topology: Handle the !APIC case gracefully 2024-03-23 12:35:56 +01:00
xtensa - Sumanth Korikkar has taught s390 to allocate hotplug-time page frames 2024-03-14 17:43:30 -07:00
.gitignore
Kconfig arch: consolidate existing CONFIG_PAGE_SIZE_*KB definitions 2024-03-06 19:28:26 +01:00