x86/apic: Provide apic_update_callback()
authorThomas Gleixner <tglx@linutronix.de>
Tue, 8 Aug 2023 22:04:19 +0000 (15:04 -0700)
committerDave Hansen <dave.hansen@linux.intel.com>
Wed, 9 Aug 2023 19:00:46 +0000 (12:00 -0700)
commitbef4f379e953af49a9bd81790954e78fcb264920
tree6f12836bb19fccaba438dc686b7aa3bbf73cb156
parent3b5244bef15e0ec2b51ae5ea4182e1b674d01551
x86/apic: Provide apic_update_callback()

There are already two variants of update mechanism for particular callbacks
and virtualization just writes into the data structure.

Provide an interface and use a shadow data structure to preserve callbacks
so they can be reapplied when the APIC driver is replaced.

The extra data structure is intentional as any new callback needs to be
also updated in the core code. This also prepares for static calls.

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/include/asm/apic.h
arch/x86/kernel/apic/init.c
arch/x86/kernel/setup.c