x86/cpu/topology: Provide separate APIC registration functions
authorThomas Gleixner <tglx@linutronix.de>
Tue, 13 Feb 2024 21:05:36 +0000 (22:05 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 15 Feb 2024 21:07:42 +0000 (22:07 +0100)
commit4176b541c2c68bf79d0a05f316713ed8f0c9cdb4
tree216273f3e98b893e47eeec39019c3ac9d40a62d6
parentc0a66c2847908e41c771ca2355fba935a82a9f62
x86/cpu/topology: Provide separate APIC registration functions

generic_processor_info() aside of being a complete misnomer is used for
both early boot registration and ACPI CPU hotplug.

While it's arguable that this can share some code, it results in code which
is hard to understand and kept around post init for no real reason.

Also the call sites do lots of manual fiddling in topology related
variables instead of having proper interfaces for the purpose which handle
the topology internals correctly.

Provide topology_register_apic(), topology_hotplug_apic() and
topology_hotunplug_apic() which have the extra magic of the call sites
incorporated and for now are wrappers around generic_processor_info().

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/20240213210251.605007456@linutronix.de
arch/x86/include/asm/apic.h
arch/x86/kernel/cpu/topology.c