[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/mach-apic: Move the genapic wrappers to genapic.h
commit 5eb9c143247783f9d2c53c77afb5686ed2459c8f Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Fri Nov 8 18:54:47 2024 +0000 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Mon Nov 11 15:25:38 2024 +0000 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> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/include/asm/genapic.h | 17 +++++++++++++++++ xen/arch/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 6c8845d17d..cf36d48f3b 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 b4a2f0a0b0..3e17c271d9 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 0001e93ba8..6340cd6dd7 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 677fd83218..68d6e25178 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> -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |