]> xenbits.xensource.com Git - xen.git/commitdiff
x86/mach-apic: Move the genapic wrappers to genapic.h
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 8 Nov 2024 18:54:47 +0000 (18:54 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 11 Nov 2024 15:25:38 +0000 (15:25 +0000)
This a better place for them to live.

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

index 6c8845d17d27f1bf51ecc2310ca6e5618926ee96..cf36d48f3b078491fb27605a70a8ce81d8972e3f 100644 (file)
@@ -37,6 +37,23 @@ struct genapic {
        .name = aname, \
        .probe = aprobe
 
+#define INT_DELIVERY_MODE (genapic.int_delivery_mode)
+#define INT_DEST_MODE (genapic.int_dest_mode)
+#define TARGET_CPUS ((const typeof(cpu_online_map) *)&cpu_online_map)
+#define init_apic_ldr() alternative_vcall(genapic.init_apic_ldr)
+#define cpu_mask_to_apicid(mask) ({ \
+       /* \
+        * There are a number of places where the address of a local variable \
+        * gets passed here. The use of ?: in alternative_call<N>() triggers an \
+        * "address of ... is always true" warning in such a case with at least \
+        * gcc 7 and 8. Hence the seemingly pointless local variable here. \
+        */ \
+       const cpumask_t *m_ = (mask); \
+       alternative_call(genapic.cpu_mask_to_apicid, m_); \
+})
+#define vector_allocation_cpumask(cpu) \
+       alternative_call(genapic.vector_allocation_cpumask, cpu)
+
 extern struct genapic genapic;
 extern const struct genapic apic_default;
 extern const struct genapic apic_bigsmp;
index b4a2f0a0b068280515f9a9a3002807bf33b46c0d..3e17c271d9acdadd9641960cbcfd432af0f95e17 100644 (file)
@@ -6,24 +6,6 @@
 #include <asm/genapic.h>
 #include <asm/smp.h>
 
-/* The following are dependent on APIC delivery mode (logical vs. physical). */
-#define INT_DELIVERY_MODE (genapic.int_delivery_mode)
-#define INT_DEST_MODE (genapic.int_dest_mode)
-#define TARGET_CPUS ((const typeof(cpu_online_map) *)&cpu_online_map)
-#define init_apic_ldr() alternative_vcall(genapic.init_apic_ldr)
-#define cpu_mask_to_apicid(mask) ({ \
-       /* \
-        * There are a number of places where the address of a local variable \
-        * gets passed here. The use of ?: in alternative_call<N>() triggers an \
-        * "address of ... is always true" warning in such a case with at least \
-        * gcc 7 and 8. Hence the seemingly pointless local variable here. \
-        */ \
-       const cpumask_t *m_ = (mask); \
-       alternative_call(genapic.cpu_mask_to_apicid, m_); \
-})
-#define vector_allocation_cpumask(cpu) \
-       alternative_call(genapic.vector_allocation_cpumask, cpu)
-
 static inline void enable_apic_mode(void)
 {
        /* Not needed for modern ES7000 which boot in Virtual Wire mode. */
index 0001e93ba8ac7b6e3531adf5d8f2ed4b681c4fa7..6340cd6dd73daf133f3a484fff20ac3c4f5d1bea 100644 (file)
 #include <xen/trace.h>
 #include <xen/softirq.h>
 #include <xsm/xsm.h>
+
+#include <asm/apic.h>
+#include <asm/genapic.h>
+#include <asm/io_apic.h>
 #include <asm/msi.h>
 #include <asm/current.h>
 #include <asm/flushtlb.h>
-#include <asm/mach-generic/mach_apic.h>
+
 #include <irq_vectors.h>
 #include <public/physdev.h>
 
index 677fd83218d4929a23e28caf82730dd10b0e106f..68d6e25178a99d1b92c366f7c91c7732db9c80b2 100644 (file)
 #include <xen/iocap.h>
 #include <xen/keyhandler.h>
 #include <xen/pfn.h>
+
+#include <asm/apic.h>
+#include <asm/genapic.h>
 #include <asm/io.h>
+#include <asm/io_apic.h>
 #include <asm/smp.h>
 #include <asm/desc.h>
 #include <asm/msi.h>
 #include <asm/fixmap.h>
 #include <asm/p2m.h>
-#include <mach_apic.h>
+
 #include <io_ports.h>
 #include <irq_vectors.h>
 #include <public/physdev.h>