From: Andrew Cooper Date: Fri, 8 Nov 2024 19:40:46 +0000 (+0000) Subject: x86: Move mach-default/irq_vectors.h to asm/irq-vectors.h X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=fc147fec19a89ed782d7bf5f4d7d78fdf982fcdf;p=people%2Froyger%2Fxen.git x86: Move mach-default/irq_vectors.h to asm/irq-vectors.h irq_vectors.h is included by with multiple paths. Move it to be a regular header instead. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c index 8f192f80b8..8e8ff4d155 100644 --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -26,6 +26,8 @@ #include #include #include + +#include #include #include #include @@ -38,7 +40,6 @@ #include #include -#include #include #include #include diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c index a5bb1689c7..c28192ea26 100644 --- a/xen/arch/x86/cpu/vpmu.c +++ b/xen/arch/x86/cpu/vpmu.c @@ -13,13 +13,15 @@ #include #include #include + +#include #include #include #include #include #include #include -#include + #include #include diff --git a/xen/arch/x86/i8259.c b/xen/arch/x86/i8259.c index 10ddd2b0fb..a14f20bdf6 100644 --- a/xen/arch/x86/i8259.c +++ b/xen/arch/x86/i8259.c @@ -19,9 +19,9 @@ #include #include #include +#include #include #include -#include /* * This is the 'legacy' 8259A Programmable Interrupt Controller, diff --git a/xen/arch/x86/include/asm/irq-vectors.h b/xen/arch/x86/include/asm/irq-vectors.h new file mode 100644 index 0000000000..f546aedd87 --- /dev/null +++ b/xen/arch/x86/include/asm/irq-vectors.h @@ -0,0 +1,46 @@ +#ifndef _ASM_IRQ_VECTORS_H +#define _ASM_IRQ_VECTORS_H + +/* Processor-initiated interrupts are all high priority. */ +#define SPURIOUS_APIC_VECTOR 0xff +#define ERROR_APIC_VECTOR 0xfe +#define INVALIDATE_TLB_VECTOR 0xfd +#define EVENT_CHECK_VECTOR 0xfc +#define CALL_FUNCTION_VECTOR 0xfb +#define LOCAL_TIMER_VECTOR 0xfa +#define PMU_APIC_VECTOR 0xf9 +/* + * High-priority dynamically-allocated vectors. For interrupts that + * must be higher priority than any guest-bound interrupt. + */ +#define FIRST_HIPRIORITY_VECTOR 0xf1 +#define LAST_HIPRIORITY_VECTOR 0xf8 +/* IRQ0 (timer) is statically allocated but must be high priority. */ +#define IRQ0_VECTOR 0xf0 + +/* Legacy PIC uses vectors 0x20-0x2f. */ +#define FIRST_LEGACY_VECTOR FIRST_DYNAMIC_VECTOR +#define LAST_LEGACY_VECTOR (FIRST_LEGACY_VECTOR + 0xf) + +#ifdef CONFIG_PV32 +#define HYPERCALL_VECTOR 0x82 +#endif + +#define LEGACY_SYSCALL_VECTOR 0x80 + +/* + * Dynamically-allocated vectors available to any driver. Note that the + * legacy vector range is a sub-range of this one, re-used on CPUs not + * sharing vectors with CPU 0. + */ +#define FIRST_DYNAMIC_VECTOR 0x20 +#define LAST_DYNAMIC_VECTOR 0xef +#define NR_DYNAMIC_VECTORS (LAST_DYNAMIC_VECTOR - FIRST_DYNAMIC_VECTOR + 1) + +/* There's no IRQ2 at the PIC. */ +#define IRQ_MOVE_CLEANUP_VECTOR (FIRST_LEGACY_VECTOR + 2) + +#define FIRST_IRQ_VECTOR FIRST_DYNAMIC_VECTOR +#define LAST_IRQ_VECTOR LAST_HIPRIORITY_VECTOR + +#endif /* _ASM_IRQ_VECTORS_H */ diff --git a/xen/arch/x86/include/asm/mach-default/irq_vectors.h b/xen/arch/x86/include/asm/mach-default/irq_vectors.h deleted file mode 100644 index f546aedd87..0000000000 --- a/xen/arch/x86/include/asm/mach-default/irq_vectors.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef _ASM_IRQ_VECTORS_H -#define _ASM_IRQ_VECTORS_H - -/* Processor-initiated interrupts are all high priority. */ -#define SPURIOUS_APIC_VECTOR 0xff -#define ERROR_APIC_VECTOR 0xfe -#define INVALIDATE_TLB_VECTOR 0xfd -#define EVENT_CHECK_VECTOR 0xfc -#define CALL_FUNCTION_VECTOR 0xfb -#define LOCAL_TIMER_VECTOR 0xfa -#define PMU_APIC_VECTOR 0xf9 -/* - * High-priority dynamically-allocated vectors. For interrupts that - * must be higher priority than any guest-bound interrupt. - */ -#define FIRST_HIPRIORITY_VECTOR 0xf1 -#define LAST_HIPRIORITY_VECTOR 0xf8 -/* IRQ0 (timer) is statically allocated but must be high priority. */ -#define IRQ0_VECTOR 0xf0 - -/* Legacy PIC uses vectors 0x20-0x2f. */ -#define FIRST_LEGACY_VECTOR FIRST_DYNAMIC_VECTOR -#define LAST_LEGACY_VECTOR (FIRST_LEGACY_VECTOR + 0xf) - -#ifdef CONFIG_PV32 -#define HYPERCALL_VECTOR 0x82 -#endif - -#define LEGACY_SYSCALL_VECTOR 0x80 - -/* - * Dynamically-allocated vectors available to any driver. Note that the - * legacy vector range is a sub-range of this one, re-used on CPUs not - * sharing vectors with CPU 0. - */ -#define FIRST_DYNAMIC_VECTOR 0x20 -#define LAST_DYNAMIC_VECTOR 0xef -#define NR_DYNAMIC_VECTORS (LAST_DYNAMIC_VECTOR - FIRST_DYNAMIC_VECTOR + 1) - -/* There's no IRQ2 at the PIC. */ -#define IRQ_MOVE_CLEANUP_VECTOR (FIRST_LEGACY_VECTOR + 2) - -#define FIRST_IRQ_VECTOR FIRST_DYNAMIC_VECTOR -#define LAST_IRQ_VECTOR LAST_HIPRIORITY_VECTOR - -#endif /* _ASM_IRQ_VECTORS_H */ diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 13daebc10a..12cc4a561d 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -42,7 +43,6 @@ #include #include -#include #include #include diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 6340cd6dd7..e56bacc88d 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -25,11 +25,11 @@ #include #include #include +#include #include #include #include -#include #include /* opt_noirqbalance: If true, software IRQ balancing/affinity is disabled. */ diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c index 68d6e25178..be5ef99e08 100644 --- a/xen/arch/x86/msi.c +++ b/xen/arch/x86/msi.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -33,7 +34,6 @@ #include #include -#include #include #include #include diff --git a/xen/arch/x86/pv/hypercall.c b/xen/arch/x86/pv/hypercall.c index 4294e93012..2febade44b 100644 --- a/xen/arch/x86/pv/hypercall.c +++ b/xen/arch/x86/pv/hypercall.c @@ -11,9 +11,10 @@ #include #include #include + #include +#include #include -#include /* Forced inline to cause 'compat' to be evaluated at compile time. */ static void always_inline diff --git a/xen/arch/x86/pv/traps.c b/xen/arch/x86/pv/traps.c index ed8aa97382..fd1597d0bd 100644 --- a/xen/arch/x86/pv/traps.c +++ b/xen/arch/x86/pv/traps.c @@ -13,10 +13,10 @@ #include #include +#include #include #include #include -#include void pv_inject_event(const struct x86_event *event) { diff --git a/xen/arch/x86/smp.c b/xen/arch/x86/smp.c index bd337e548c..02a6ed7593 100644 --- a/xen/arch/x86/smp.c +++ b/xen/arch/x86/smp.c @@ -19,13 +19,13 @@ #include #include #include +#include #include #include #include #include #include #include -#include /* Helper functions to prepare APIC register values. */ static unsigned int prepare_ICR(unsigned int shortcut, int vector) diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c index 42272a9844..568a3abe1f 100644 --- a/xen/arch/x86/smpboot.c +++ b/xen/arch/x86/smpboot.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include unsigned long __read_mostly trampoline_phys; enum ap_boot_method __read_mostly ap_boot_method = AP_BOOT_NORMAL; diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index a9c2c607eb..fd8a4448e3 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -69,7 +69,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/xen/arch/x86/x86_64/compat/entry.S b/xen/arch/x86/x86_64/compat/entry.S index a99646c0cd..1e87652f4b 100644 --- a/xen/arch/x86/x86_64/compat/entry.S +++ b/xen/arch/x86/x86_64/compat/entry.S @@ -5,11 +5,11 @@ .file "x86_64/compat/entry.S" #include +#include #include #include #include #include -#include FUNC(entry_int82) ENDBR64 diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S index c5c723b5f4..40d094d5b2 100644 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -7,10 +7,10 @@ .file "x86_64/entry.S" #include +#include #include #include #include -#include /* %rsp: struct cpu_user_regs */ .macro ASSERT_CONTEXT_IS_XEN