|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 09/10] x86/mach-apic: Move the genapic wrappers to genapic.h
This a better place for them to live.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
xen/arch/x86/include/asm/genapic.h | 17 +++++++++++++++++
.../x86/include/asm/mach-generic/mach_apic.h | 18 ------------------
xen/arch/x86/irq.c | 6 +++++-
xen/arch/x86/msi.c | 6 +++++-
4 files changed, 27 insertions(+), 20 deletions(-)
diff --git a/xen/arch/x86/include/asm/genapic.h
b/xen/arch/x86/include/asm/genapic.h
index 6c8845d17d27..cf36d48f3b07 100644
--- a/xen/arch/x86/include/asm/genapic.h
+++ b/xen/arch/x86/include/asm/genapic.h
@@ -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;
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 b4a2f0a0b068..3e17c271d9ac 100644
--- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h
+++ b/xen/arch/x86/include/asm/mach-generic/mach_apic.h
@@ -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. */
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 0001e93ba8ac..6340cd6dd73d 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -21,10 +21,14 @@
#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>
diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c
index 677fd83218d4..68d6e25178a9 100644
--- a/xen/arch/x86/msi.c
+++ b/xen/arch/x86/msi.c
@@ -21,13 +21,17 @@
#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>
--
2.39.5
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |