@@ -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;
@@ -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. */
@@ -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>
@@ -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>
This a better place for them to live. 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/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(-)