summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/apic/apic.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2023-08-08 15:04:02 -0700
committerDave Hansen <dave.hansen@linux.intel.com>2023-08-09 11:58:27 -0700
commit5a3a46bd161d76f117b030ece0eb0de0dfe3ba59 (patch)
treeb930b5184acd96afcc6d89320809192bb5caac5a /arch/x86/kernel/apic/apic.c
parent9d87f5b67e100f253aed995a31fedff2983b7639 (diff)
downloadlinux-5a3a46bd161d76f117b030ece0eb0de0dfe3ba59.tar.gz
linux-5a3a46bd161d76f117b030ece0eb0de0dfe3ba59.tar.bz2
linux-5a3a46bd161d76f117b030ece0eb0de0dfe3ba59.zip
x86/apic: Mop up apic::apic_id_registered()
Really not a hotpath and again no reason for having a gazillion of empty callbacks returning 1. Make it return bool and provide one shared implementation for the remaining users. 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)
Diffstat (limited to 'arch/x86/kernel/apic/apic.c')
-rw-r--r--arch/x86/kernel/apic/apic.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index c2656a3ffbec..4ee95cb2178e 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1571,11 +1571,8 @@ static void setup_local_APIC(void)
apic_write(APIC_ESR, 0);
}
#endif
- /*
- * Double-check whether this APIC is really registered.
- * This is meaningless in clustered apic mode, so we skip it.
- */
- BUG_ON(!apic->apic_id_registered());
+ /* Validate that the APIC is registered if required */
+ BUG_ON(apic->apic_id_registered && !apic->apic_id_registered());
/*
* Intel recommends to set DFR, LDR and TPR before enabling