x86/cpu/topology: Assign hotpluggable CPUIDs during init
authorThomas Gleixner <tglx@linutronix.de>
Tue, 13 Feb 2024 21:05:59 +0000 (22:05 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 15 Feb 2024 21:07:44 +0000 (22:07 +0100)
commitea2dd8a5d4361ef0b000196043fa407f05b16f1d
tree6ba6656ca3f7e0e0f3a832510e2eb49ea8c172ba
parent7cdcdab1a660bbe9f98bf1591c048ce7ccee59e0
x86/cpu/topology: Assign hotpluggable CPUIDs during init

There is no point in assigning the CPU numbers during ACPI physical
hotplug. The number of possible hotplug CPUs is known when the possible map
is initialized, so the CPU numbers can be associated to the registered
non-present APIC IDs right there.

This allows to put more code into the __init section and makes the related
data __ro_after_init.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Tested-by: Sohil Mehta <sohil.mehta@intel.com>
Link: https://lore.kernel.org/r/20240213210252.517339971@linutronix.de
arch/x86/kernel/cpu/topology.c