summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/apic/apic_common.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_common.c
parent9d87f5b67e100f253aed995a31fedff2983b7639 (diff)
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_common.c')
-rw-r--r--arch/x86/kernel/apic/apic_common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/apic/apic_common.c b/arch/x86/kernel/apic/apic_common.c
index d55fdb33b8e5..bbb5d5a6c820 100644
--- a/arch/x86/kernel/apic/apic_common.c
+++ b/arch/x86/kernel/apic/apic_common.c
@@ -42,6 +42,11 @@ int default_apic_id_valid(u32 apicid)
return (apicid < 255);
}
+bool default_apic_id_registered(void)
+{
+ return physid_isset(read_apic_id(), phys_cpu_present_map);
+}
+
/*
* Set up the logical destination ID when the APIC operates in logical
* destination mode.