[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Clean up subarch 'mach-foo' header files. No need for
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 108a62015bf4c3e783f8602646b3a51880f1f2a6 # Parent 387b6824ce29949361c5db5242c53f877317928d Clean up subarch 'mach-foo' header files. No need for subarch apicdef.h and ipi.h can be much simplified. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> diff -r 387b6824ce29 -r 108a62015bf4 xen/arch/x86/genapic/bigsmp.c --- a/xen/arch/x86/genapic/bigsmp.c Mon Apr 3 15:35:06 2006 +++ b/xen/arch/x86/genapic/bigsmp.c Mon Apr 3 16:47:42 2006 @@ -2,7 +2,6 @@ * APIC driver for "bigsmp" XAPIC machines with more than 8 virtual CPUs. * Drives the local APIC in "clustered mode". */ -#define APIC_DEFINITION 1 #include <xen/config.h> #include <xen/cpumask.h> #include <asm/current.h> @@ -14,9 +13,8 @@ #include <xen/smp.h> #include <xen/init.h> #include <xen/dmi.h> +#include <asm/mach_ipi.h> #include <asm/mach-bigsmp/mach_apic.h> -#include <asm/mach-bigsmp/mach_apicdef.h> -#include <asm/mach-bigsmp/mach_ipi.h> #include <asm/mach-default/mach_mpparse.h> static int dmi_bigsmp; /* can be set by dmi scanners */ @@ -52,4 +50,7 @@ return dmi_bigsmp; } -struct genapic apic_bigsmp = APIC_INIT("bigsmp", probe_bigsmp); +struct genapic apic_bigsmp = { + APIC_INIT("bigsmp", probe_bigsmp), + .send_ipi_mask = send_IPI_mask_sequence +}; diff -r 387b6824ce29 -r 108a62015bf4 xen/arch/x86/genapic/default.c --- a/xen/arch/x86/genapic/default.c Mon Apr 3 15:35:06 2006 +++ b/xen/arch/x86/genapic/default.c Mon Apr 3 16:47:42 2006 @@ -1,12 +1,10 @@ /* * Default generic APIC driver. This handles upto 8 CPUs. */ -#define APIC_DEFINITION 1 #include <xen/config.h> #include <xen/cpumask.h> #include <asm/current.h> #include <asm/mpspec.h> -#include <asm/mach-default/mach_apicdef.h> #include <asm/genapic.h> #include <asm/fixmap.h> #include <asm/apicdef.h> @@ -14,8 +12,8 @@ #include <xen/string.h> #include <xen/smp.h> #include <xen/init.h> +#include <asm/mach_ipi.h> #include <asm/mach-default/mach_apic.h> -#include <asm/mach-default/mach_ipi.h> #include <asm/mach-default/mach_mpparse.h> /* should be called last. */ @@ -24,4 +22,7 @@ return 1; } -struct genapic apic_default = APIC_INIT("default", probe_default); +struct genapic apic_default = { + APIC_INIT("default", probe_default), + .send_ipi_mask = send_IPI_mask_bitmask +}; diff -r 387b6824ce29 -r 108a62015bf4 xen/arch/x86/genapic/es7000.c --- a/xen/arch/x86/genapic/es7000.c Mon Apr 3 15:35:06 2006 +++ b/xen/arch/x86/genapic/es7000.c Mon Apr 3 16:47:42 2006 @@ -1,7 +1,6 @@ /* * APIC driver for the Unisys ES7000 chipset. */ -#define APIC_DEFINITION 1 #include <xen/config.h> #include <xen/cpumask.h> #include <asm/current.h> @@ -14,11 +13,9 @@ #include <xen/string.h> #include <xen/smp.h> #include <xen/init.h> -#include <asm/mach-es7000/mach_apicdef.h> +#include <asm/mach_ipi.h> #include <asm/mach-es7000/mach_apic.h> -#include <asm/mach-es7000/mach_ipi.h> #include <asm/mach-es7000/mach_mpparse.h> -#include <asm/mach-es7000/mach_wakecpu.h> static __init int probe_es7000(void) { @@ -26,4 +23,7 @@ return 0; } -struct genapic apic_es7000 = APIC_INIT("es7000", probe_es7000); +struct genapic apic_es7000 = { + APIC_INIT("es7000", probe_es7000), + .send_ipi_mask = send_IPI_mask_sequence +}; diff -r 387b6824ce29 -r 108a62015bf4 xen/arch/x86/genapic/probe.c --- a/xen/arch/x86/genapic/probe.c Mon Apr 3 15:35:06 2006 +++ b/xen/arch/x86/genapic/probe.c Mon Apr 3 16:47:42 2006 @@ -103,8 +103,3 @@ } return 0; } - -int hard_smp_processor_id(void) -{ - return genapic->get_apic_id(*(unsigned long *)(APIC_BASE+APIC_ID)); -} diff -r 387b6824ce29 -r 108a62015bf4 xen/arch/x86/genapic/summit.c --- a/xen/arch/x86/genapic/summit.c Mon Apr 3 15:35:06 2006 +++ b/xen/arch/x86/genapic/summit.c Mon Apr 3 16:47:42 2006 @@ -1,7 +1,6 @@ /* * APIC driver for the IBM "Summit" chipset. */ -#define APIC_DEFINITION 1 #include <xen/config.h> #include <xen/cpumask.h> #include <asm/current.h> @@ -13,9 +12,8 @@ #include <xen/string.h> #include <xen/smp.h> #include <xen/init.h> +#include <asm/mach_ipi.h> #include <asm/mach-summit/mach_apic.h> -#include <asm/mach-summit/mach_apicdef.h> -#include <asm/mach-summit/mach_ipi.h> #include <asm/mach-summit/mach_mpparse.h> static __init int probe_summit(void) @@ -24,4 +22,7 @@ return 0; } -struct genapic apic_summit = APIC_INIT("summit", probe_summit); +struct genapic apic_summit = { + APIC_INIT("summit", probe_summit), + .send_ipi_mask = send_IPI_mask_sequence +}; diff -r 387b6824ce29 -r 108a62015bf4 xen/arch/x86/smp.c --- a/xen/arch/x86/smp.c Mon Apr 3 15:35:06 2006 +++ b/xen/arch/x86/smp.c Mon Apr 3 16:47:42 2006 @@ -20,8 +20,8 @@ #include <asm/flushtlb.h> #include <asm/smpboot.h> #include <asm/hardirq.h> +#include <asm/mach_ipi.h> #include <mach_apic.h> -#include <mach_ipi.h> /* * Some notes on x86 processor bugs affecting SMP operation: @@ -119,7 +119,7 @@ local_irq_restore(flags); } -inline void send_IPI_mask_sequence(cpumask_t mask, int vector) +void send_IPI_mask_sequence(cpumask_t mask, int vector) { unsigned long cfg, flags; unsigned int query_cpu; diff -r 387b6824ce29 -r 108a62015bf4 xen/include/asm-x86/apicdef.h --- a/xen/include/asm-x86/apicdef.h Mon Apr 3 15:35:06 2006 +++ b/xen/include/asm-x86/apicdef.h Mon Apr 3 16:47:42 2006 @@ -11,6 +11,9 @@ #define APIC_DEFAULT_PHYS_BASE 0xfee00000 #define APIC_ID 0x20 +#define APIC_ID_MASK (0xFFu<<24) +#define GET_APIC_ID(x) (((x)>>24)&0xFFu) +#define SET_APIC_ID(x) (((x)<<24)) #define APIC_LVR 0x30 #define APIC_LVR_MASK 0xFF00FF #define GET_APIC_VERSION(x) ((x)&0xFF) diff -r 387b6824ce29 -r 108a62015bf4 xen/include/asm-x86/genapic.h --- a/xen/include/asm-x86/genapic.h Mon Apr 3 15:35:06 2006 +++ b/xen/include/asm-x86/genapic.h Mon Apr 3 16:47:42 2006 @@ -49,16 +49,15 @@ char *productid); int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id); - unsigned (*get_apic_id)(unsigned long x); unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask); /* ipi */ - void (*send_IPI_mask)(cpumask_t mask, int vector); + void (*send_ipi_mask)(cpumask_t mask, int vector); }; #define APICFUNC(x) .x = x -#define APIC_INIT(aname, aprobe) { \ +#define APIC_INIT(aname, aprobe) \ .name = aname, \ .probe = aprobe, \ .int_delivery_mode = INT_DELIVERY_MODE, \ @@ -79,13 +78,10 @@ APICFUNC(apicid_to_cpu_present), \ APICFUNC(check_phys_apicid_present), \ APICFUNC(mps_oem_check), \ - APICFUNC(get_apic_id), \ APICFUNC(cpu_mask_to_apicid), \ APICFUNC(acpi_madt_oem_check), \ - APICFUNC(send_IPI_mask), \ APICFUNC(enable_apic_mode), \ - APICFUNC(phys_pkg_id), \ - } + APICFUNC(phys_pkg_id) extern struct genapic *genapic; diff -r 387b6824ce29 -r 108a62015bf4 xen/include/asm-x86/mach-default/mach_apic.h --- a/xen/include/asm-x86/mach-default/mach_apic.h Mon Apr 3 15:35:06 2006 +++ b/xen/include/asm-x86/mach-default/mach_apic.h Mon Apr 3 16:47:42 2006 @@ -1,7 +1,6 @@ #ifndef __ASM_MACH_APIC_H #define __ASM_MACH_APIC_H -#include <mach_apicdef.h> #include <asm/smp.h> #define APIC_DFR_VALUE (APIC_DFR_FLAT) diff -r 387b6824ce29 -r 108a62015bf4 xen/include/asm-x86/smp.h --- a/xen/include/asm-x86/smp.h Mon Apr 3 15:35:06 2006 +++ b/xen/include/asm-x86/smp.h Mon Apr 3 16:47:42 2006 @@ -74,16 +74,11 @@ #ifdef CONFIG_X86_LOCAL_APIC -#ifdef APIC_DEFINITION -extern int hard_smp_processor_id(void); -#else -#include <mach_apicdef.h> static inline int hard_smp_processor_id(void) { /* we don't want to mark this access volatile - bad code generation */ return GET_APIC_ID(*(unsigned int *)(APIC_BASE+APIC_ID)); } -#endif static __inline int logical_smp_processor_id(void) { diff -r 387b6824ce29 -r 108a62015bf4 xen/include/asm-x86/mach-default/mach_mpspec.h --- /dev/null Mon Apr 3 15:35:06 2006 +++ b/xen/include/asm-x86/mach-default/mach_mpspec.h Mon Apr 3 16:47:42 2006 @@ -0,0 +1,10 @@ +#ifndef __ASM_MACH_MPSPEC_H +#define __ASM_MACH_MPSPEC_H + +#define MAX_IRQ_SOURCES 256 + +/* Summit or generic (i.e. installer) kernels need lots of bus entries. */ +/* Maximum 256 PCI busses, plus 1 ISA bus in each of 4 cabinets. */ +#define MAX_MP_BUSSES 260 + +#endif /* __ASM_MACH_MPSPEC_H */ diff -r 387b6824ce29 -r 108a62015bf4 xen/include/asm-x86/mach_ipi.h --- /dev/null Mon Apr 3 15:35:06 2006 +++ b/xen/include/asm-x86/mach_ipi.h Mon Apr 3 16:47:42 2006 @@ -0,0 +1,11 @@ +#ifndef __ASM_MACH_IPI_H +#define __ASM_MACH_IPI_H + +#include <asm/genapic.h> + +void send_IPI_mask_bitmask(cpumask_t mask, int vector); +void send_IPI_mask_sequence(cpumask_t mask, int vector); + +#define send_IPI_mask (genapic->send_ipi_mask) + +#endif /* __ASM_MACH_IPI_H */ diff -r 387b6824ce29 -r 108a62015bf4 xen/include/asm-x86/mach-bigsmp/mach_apicdef.h --- a/xen/include/asm-x86/mach-bigsmp/mach_apicdef.h Mon Apr 3 15:35:06 2006 +++ /dev/null Mon Apr 3 16:47:42 2006 @@ -1,11 +0,0 @@ -#ifndef __ASM_MACH_APICDEF_H -#define __ASM_MACH_APICDEF_H - -static inline unsigned get_apic_id(unsigned long x) -{ - return (((x)>>24)&0xFF); -} - -#define GET_APIC_ID(x) get_apic_id(x) - -#endif diff -r 387b6824ce29 -r 108a62015bf4 xen/include/asm-x86/mach-bigsmp/mach_ipi.h --- a/xen/include/asm-x86/mach-bigsmp/mach_ipi.h Mon Apr 3 15:35:06 2006 +++ /dev/null Mon Apr 3 16:47:42 2006 @@ -1,11 +0,0 @@ -#ifndef __ASM_MACH_IPI_H -#define __ASM_MACH_IPI_H - -void send_IPI_mask_sequence(cpumask_t mask, int vector); - -static inline void send_IPI_mask(cpumask_t mask, int vector) -{ - send_IPI_mask_sequence(mask, vector); -} - -#endif /* __ASM_MACH_IPI_H */ diff -r 387b6824ce29 -r 108a62015bf4 xen/include/asm-x86/mach-default/mach_apicdef.h --- a/xen/include/asm-x86/mach-default/mach_apicdef.h Mon Apr 3 15:35:06 2006 +++ /dev/null Mon Apr 3 16:47:42 2006 @@ -1,11 +0,0 @@ -#ifndef __ASM_MACH_APICDEF_H -#define __ASM_MACH_APICDEF_H - -static inline unsigned get_apic_id(unsigned long x) -{ - return (((x)>>24)&0xF); -} - -#define GET_APIC_ID(x) get_apic_id(x) - -#endif diff -r 387b6824ce29 -r 108a62015bf4 xen/include/asm-x86/mach-default/mach_ipi.h --- a/xen/include/asm-x86/mach-default/mach_ipi.h Mon Apr 3 15:35:06 2006 +++ /dev/null Mon Apr 3 16:47:42 2006 @@ -1,11 +0,0 @@ -#ifndef __ASM_MACH_IPI_H -#define __ASM_MACH_IPI_H - -void send_IPI_mask_bitmask(cpumask_t mask, int vector); - -static inline void send_IPI_mask(cpumask_t mask, int vector) -{ - send_IPI_mask_bitmask(mask, vector); -} - -#endif /* __ASM_MACH_IPI_H */ diff -r 387b6824ce29 -r 108a62015bf4 xen/include/asm-x86/mach-es7000/mach_apicdef.h --- a/xen/include/asm-x86/mach-es7000/mach_apicdef.h Mon Apr 3 15:35:06 2006 +++ /dev/null Mon Apr 3 16:47:42 2006 @@ -1,11 +0,0 @@ -#ifndef __ASM_MACH_APICDEF_H -#define __ASM_MACH_APICDEF_H - -static inline unsigned get_apic_id(unsigned long x) -{ - return (((x)>>24)&0xFF); -} - -#define GET_APIC_ID(x) get_apic_id(x) - -#endif diff -r 387b6824ce29 -r 108a62015bf4 xen/include/asm-x86/mach-es7000/mach_ipi.h --- a/xen/include/asm-x86/mach-es7000/mach_ipi.h Mon Apr 3 15:35:06 2006 +++ /dev/null Mon Apr 3 16:47:42 2006 @@ -1,11 +0,0 @@ -#ifndef __ASM_MACH_IPI_H -#define __ASM_MACH_IPI_H - -void send_IPI_mask_sequence(cpumask_t mask, int vector); - -static inline void send_IPI_mask(cpumask_t mask, int vector) -{ - send_IPI_mask_sequence(mask, vector); -} - -#endif /* __ASM_MACH_IPI_H */ diff -r 387b6824ce29 -r 108a62015bf4 xen/include/asm-x86/mach-es7000/mach_wakecpu.h --- a/xen/include/asm-x86/mach-es7000/mach_wakecpu.h Mon Apr 3 15:35:06 2006 +++ /dev/null Mon Apr 3 16:47:42 2006 @@ -1,58 +0,0 @@ -#ifndef __ASM_MACH_WAKECPU_H -#define __ASM_MACH_WAKECPU_H - -/* - * This file copes with machines that wakeup secondary CPUs by the - * INIT, INIT, STARTUP sequence. - */ - -#ifdef CONFIG_ES7000_CLUSTERED_APIC -#define WAKE_SECONDARY_VIA_MIP -#else -#define WAKE_SECONDARY_VIA_INIT -#endif - -#ifdef WAKE_SECONDARY_VIA_MIP -extern int es7000_start_cpu(int cpu, unsigned long eip); -static inline int -wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip) -{ - int boot_error = 0; - boot_error = es7000_start_cpu(phys_apicid, start_eip); - return boot_error; -} -#endif - -#define TRAMPOLINE_LOW maddr_to_virt(0x467) -#define TRAMPOLINE_HIGH maddr_to_virt(0x469) - -#define boot_cpu_apicid boot_cpu_physical_apicid - -static inline void wait_for_init_deassert(atomic_t *deassert) -{ -#ifdef WAKE_SECONDARY_VIA_INIT - while (!atomic_read(deassert)); -#endif - return; -} - -/* Nothing to do for most platforms, since cleared by the INIT cycle */ -static inline void smp_callin_clear_local_apic(void) -{ -} - -static inline void store_NMI_vector(unsigned short *high, unsigned short *low) -{ -} - -static inline void restore_NMI_vector(unsigned short *high, unsigned short *low) -{ -} - -#if APIC_DEBUG - #define inquire_remote_apic(apicid) __inquire_remote_apic(apicid) -#else - #define inquire_remote_apic(apicid) {} -#endif - -#endif /* __ASM_MACH_WAKECPU_H */ diff -r 387b6824ce29 -r 108a62015bf4 xen/include/asm-x86/mach-generic/mach_apicdef.h --- a/xen/include/asm-x86/mach-generic/mach_apicdef.h Mon Apr 3 15:35:06 2006 +++ /dev/null Mon Apr 3 16:47:42 2006 @@ -1,10 +0,0 @@ -#ifndef _GENAPIC_MACH_APICDEF_H -#define _GENAPIC_MACH_APICDEF_H 1 - -#ifndef APIC_DEFINITION -#include <asm/genapic.h> - -#define GET_APIC_ID (genapic->get_apic_id) -#endif - -#endif diff -r 387b6824ce29 -r 108a62015bf4 xen/include/asm-x86/mach-generic/mach_ipi.h --- a/xen/include/asm-x86/mach-generic/mach_ipi.h Mon Apr 3 15:35:06 2006 +++ /dev/null Mon Apr 3 16:47:42 2006 @@ -1,8 +0,0 @@ -#ifndef _MACH_IPI_H -#define _MACH_IPI_H 1 - -#include <asm/genapic.h> - -#define send_IPI_mask (genapic->send_IPI_mask) - -#endif diff -r 387b6824ce29 -r 108a62015bf4 xen/include/asm-x86/mach-generic/mach_mpspec.h --- a/xen/include/asm-x86/mach-generic/mach_mpspec.h Mon Apr 3 15:35:06 2006 +++ /dev/null Mon Apr 3 16:47:42 2006 @@ -1,10 +0,0 @@ -#ifndef __ASM_MACH_MPSPEC_H -#define __ASM_MACH_MPSPEC_H - -#define MAX_IRQ_SOURCES 256 - -/* Summit or generic (i.e. installer) kernels need lots of bus entries. */ -/* Maximum 256 PCI busses, plus 1 ISA bus in each of 4 cabinets. */ -#define MAX_MP_BUSSES 260 - -#endif /* __ASM_MACH_MPSPEC_H */ diff -r 387b6824ce29 -r 108a62015bf4 xen/include/asm-x86/mach-summit/mach_apicdef.h --- a/xen/include/asm-x86/mach-summit/mach_apicdef.h Mon Apr 3 15:35:06 2006 +++ /dev/null Mon Apr 3 16:47:42 2006 @@ -1,11 +0,0 @@ -#ifndef __ASM_MACH_APICDEF_H -#define __ASM_MACH_APICDEF_H - -static inline unsigned get_apic_id(unsigned long x) -{ - return (((x)>>24)&0xFF); -} - -#define GET_APIC_ID(x) get_apic_id(x) - -#endif diff -r 387b6824ce29 -r 108a62015bf4 xen/include/asm-x86/mach-summit/mach_ipi.h --- a/xen/include/asm-x86/mach-summit/mach_ipi.h Mon Apr 3 15:35:06 2006 +++ /dev/null Mon Apr 3 16:47:42 2006 @@ -1,11 +0,0 @@ -#ifndef __ASM_MACH_IPI_H -#define __ASM_MACH_IPI_H - -void send_IPI_mask_sequence(cpumask_t mask, int vector); - -static inline void send_IPI_mask(cpumask_t mask, int vector) -{ - send_IPI_mask_sequence(mask, vector); -} - -#endif /* __ASM_MACH_IPI_H */ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |