]> xenbits.xensource.com Git - xen.git/commitdiff
x86/mach-apic: Drop check_apicid_used()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 8 Nov 2024 18:35:29 +0000 (18:35 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 11 Nov 2024 15:25:38 +0000 (15:25 +0000)
It's an unnecessary wrapper, and is longer than the operation it wraps.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/include/asm/mach-generic/mach_apic.h
xen/arch/x86/io_apic.c

index b3e9ea6600ef494fb90ac6813eed538124ba3c49..c8e0637f44245dbe398cbb7ce4a9238b2320392d 100644 (file)
@@ -45,11 +45,6 @@ static inline int multi_timer_check(int apic, int irq)
  * really not sure why, since all local APICs should have distinct physical
  * IDs, and we need to know what they are.
  */
-static inline int check_apicid_used(const physid_mask_t *map, int apicid)
-{
-       return physid_isset(apicid, *map);
-}
-
 static inline int check_apicid_present(int apicid)
 {
        return physid_isset(apicid, phys_cpu_present_map);
index 0123edab649b7a6cbc2bec514dffb3d672364c56..5a4d8597e07a13574b7367293a5ae0e1ae62f017 100644 (file)
@@ -1520,8 +1520,8 @@ static void __init setup_ioapic_ids_from_mpc(void)
          * system must have a unique ID or we get lots of nice
          * 'stuck on smp_invalidate_needed IPI wait' messages.
          */
-        if (check_apicid_used(&phys_id_present_map,
-                              mp_ioapics[apic].mpc_apicid)) {
+        if ( physid_isset(mp_ioapics[apic].mpc_apicid, phys_id_present_map) )
+        {
             printk(KERN_ERR "BIOS bug, IO-APIC#%d ID %d is already used!...\n",
                    apic, mp_ioapics[apic].mpc_apicid);
             for (i = 0; i < get_physical_broadcast(); i++)
@@ -2253,10 +2253,11 @@ int __init io_apic_get_unique_id (int ioapic, int apic_id)
      * Every APIC in a system must have a unique ID or we get lots of nice 
      * 'stuck on smp_invalidate_needed IPI wait' messages.
      */
-    if (check_apicid_used(&apic_id_map, apic_id)) {
+    if ( physid_isset(apic_id, apic_id_map) )
+    {
 
         for (i = 0; i < get_physical_broadcast(); i++) {
-            if (!check_apicid_used(&apic_id_map, i))
+            if ( !physid_isset(i, apic_id_map) )
                 break;
         }