[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] x86/mach-apic: Drop check_apicid_used()



commit 9aa1e60b909713d17669a1ba98cad6f34dec17a9
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Fri Nov 8 18:35:29 2024 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Mon Nov 11 15:25:38 2024 +0000

    x86/mach-apic: Drop check_apicid_used()
    
    It's an unnecessary wrapper, and is longer than the operation it wraps.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/include/asm/mach-generic/mach_apic.h | 5 -----
 xen/arch/x86/io_apic.c                            | 9 +++++----
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/xen/arch/x86/include/asm/mach-generic/mach_apic.h 
b/xen/arch/x86/include/asm/mach-generic/mach_apic.h
index b3e9ea6600..c8e0637f44 100644
--- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h
+++ b/xen/arch/x86/include/asm/mach-generic/mach_apic.h
@@ -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);
diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index 0123edab64..5a4d8597e0 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -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;
         }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.