x86/apic: Register boot CPU APIC early
authorThomas Gleixner <tglx@linutronix.de>
Tue, 8 Aug 2023 22:03:46 +0000 (15:03 -0700)
committerDave Hansen <dave.hansen@linux.intel.com>
Wed, 9 Aug 2023 18:58:18 +0000 (11:58 -0700)
commitd63107fa882eadb59a040313510ef8511746efea
tree8f008a4f27e965b50c9154968cdec9d930379a1d
parentd10a904435fa63fccc740e750e32b80e5f63c6c8
x86/apic: Register boot CPU APIC early

Register the boot CPU APIC right when the boot CPUs APIC is read from the
hardware. No point is doing this on random places and having wild
heuristics to save the boot CPU APIC ID slot and CPU number 0 reserved.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Michael Kelley <mikelley@microsoft.com>
Tested-by: Sohil Mehta <sohil.mehta@intel.com>
Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
arch/x86/kernel/apic/apic.c