diff mbox series

[08/10] x86/mach-apic: Drop set_apicid()

Message ID 20241108195820.789716-9-andrew.cooper3@citrix.com (mailing list archive)
State New
Headers show
Series Untangle mach-generic/ | expand

Commit Message

Andrew Cooper Nov. 8, 2024, 7:58 p.m. UTC
It's an unnecessary wrapper, and longer than the operation it wraps.

It's also the only reason that mpparse.c includes mach_apic.h, other than for
transitive dependencies.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/include/asm/mach-generic/mach_apic.h | 11 -----------
 xen/arch/x86/io_apic.c                            |  4 ++--
 xen/arch/x86/mpparse.c                            |  7 ++++---
 3 files changed, 6 insertions(+), 16 deletions(-)
diff mbox series

Patch

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 7940c0234cb9..b4a2f0a0b068 100644
--- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h
+++ b/xen/arch/x86/include/asm/mach-generic/mach_apic.h
@@ -39,15 +39,4 @@  static inline int multi_timer_check(int apic, int irq)
 	return 0;
 }
 
-/*
- * The following functions based around phys_cpu_present_map are disabled in
- * some i386 Linux subarchitectures, and in x86_64 'cluster' genapic mode. I'm
- * really not sure why, since all local APICs should have distinct physical
- * IDs, and we need to know what they are.
- */
-static inline void set_apicid(int phys_apicid, physid_mask_t *map)
-{
-	physid_set(phys_apicid, *map);
-}
-
 #endif /* __ASM_MACH_APIC_H */
diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index 5a4d8597e07a..2774cd45c091 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -1537,7 +1537,7 @@  static void __init setup_ioapic_ids_from_mpc(void)
                         "phys_id_present_map\n",
                         mp_ioapics[apic].mpc_apicid);
         }
-        set_apicid(mp_ioapics[apic].mpc_apicid, &phys_id_present_map);
+        physid_set(mp_ioapics[apic].mpc_apicid, phys_id_present_map);
 
         /*
          * We need to adjust the IRQ routing table
@@ -2270,7 +2270,7 @@  int __init io_apic_get_unique_id (int ioapic, int apic_id)
         apic_id = i;
     } 
 
-    set_apicid(apic_id, &apic_id_map);
+    physid_set(apic_id, apic_id_map);
 
     if (reg_00.bits.ID != apic_id) {
         reg_00.bits.ID = apic_id;
diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c
index e13b83bbe9dd..b16c105b18bf 100644
--- a/xen/arch/x86/mpparse.c
+++ b/xen/arch/x86/mpparse.c
@@ -20,8 +20,10 @@ 
 #include <xen/delay.h>
 #include <xen/efi.h>
 #include <xen/sched.h>
-
 #include <xen/bitops.h>
+
+#include <asm/apic.h>
+#include <asm/genapic.h>
 #include <asm/smp.h>
 #include <asm/acpi.h>
 #include <asm/mtrr.h>
@@ -29,7 +31,6 @@ 
 #include <asm/io_apic.h>
 #include <asm/setup.h>
 
-#include <mach_apic.h>
 #include <bios_ebda.h>
 
 /* Have we found an MP table */
@@ -161,7 +162,7 @@  static int MP_processor_info_x(struct mpc_config_processor *m,
 	}
 	apic_version[apicid] = ver;
 
-	set_apicid(apicid, &phys_cpu_present_map);
+	physid_set(apicid, phys_cpu_present_map);
 
 	if (num_processors >= nr_cpu_ids) {
 		printk_once(XENLOG_WARNING