x86, smp: clean up ->trampoline_phys_low/high handling
authorIngo Molnar <mingo@elte.hu>
Wed, 28 Jan 2009 15:09:23 +0000 (16:09 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 28 Jan 2009 22:20:31 +0000 (23:20 +0100)
- spread out the namespace on a per apic driver basis

 - remove wrapper macros

Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/include/asm/es7000/wakecpu.h
arch/x86/include/asm/mach-default/mach_wakecpu.h
arch/x86/include/asm/mach-default/smpboot_hooks.h
arch/x86/include/asm/mach-generic/mach_wakecpu.h
arch/x86/include/asm/numaq/wakecpu.h
arch/x86/mach-generic/bigsmp.c
arch/x86/mach-generic/default.c
arch/x86/mach-generic/es7000.c
arch/x86/mach-generic/numaq.c
arch/x86/mach-generic/summit.c

index 78f0daaee436333d9162013c62324dfe66bb1b9b..4c01be6ff80c1f8d3d1dd1ddf910880824f628ff 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef __ASM_ES7000_WAKECPU_H
 #define __ASM_ES7000_WAKECPU_H
 
-#define TRAMPOLINE_PHYS_LOW    0x467
-#define TRAMPOLINE_PHYS_HIGH   0x469
+#define ES7000_TRAMPOLINE_PHYS_LOW     0x467
+#define ES7000_TRAMPOLINE_PHYS_HIGH    0x469
 
 static inline void wait_for_init_deassert(atomic_t *deassert)
 {
index 89897a6a65b92cef3aa1ca273f0142fda877c3e7..0a8d7860e44bd7bbe2a63ec31c1df54c6b9d005b 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H
 #define _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H
 
-#define TRAMPOLINE_PHYS_LOW (0x467)
-#define TRAMPOLINE_PHYS_HIGH (0x469)
+#define DEFAULT_TRAMPOLINE_PHYS_LOW (0x467)
+#define DEFAULT_TRAMPOLINE_PHYS_HIGH (0x469)
 
 static inline void wait_for_init_deassert(atomic_t *deassert)
 {
index 23bf52103b8905e662e3b9e5491b89d5b8c8c933..1def60114906bf1b1dfa98ef3bd8ac177f65010f 100644 (file)
@@ -13,10 +13,10 @@ static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip)
        CMOS_WRITE(0xa, 0xf);
        local_flush_tlb();
        pr_debug("1.\n");
-       *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_HIGH)) =
+       *((volatile unsigned short *)phys_to_virt(apic->trampoline_phys_high)) =
                                                                 start_eip >> 4;
        pr_debug("2.\n");
-       *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) =
+       *((volatile unsigned short *)phys_to_virt(apic->trampoline_phys_low)) =
                                                         start_eip & 0xf;
        pr_debug("3.\n");
 }
@@ -34,7 +34,7 @@ static inline void smpboot_restore_warm_reset_vector(void)
         */
        CMOS_WRITE(0, 0xf);
 
-       *((volatile long *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) = 0;
+       *((volatile long *)phys_to_virt(apic->trampoline_phys_low)) = 0;
 }
 
 static inline void __init smpboot_setup_io_apic(void)
index 22006bbee617b2c99c67c2091304258137fa0a50..2031377a954c2e9fd457d0cc344afe70eafb5c30 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H
 #define _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H
 
-#define TRAMPOLINE_PHYS_LOW (apic->trampoline_phys_low)
-#define TRAMPOLINE_PHYS_HIGH (apic->trampoline_phys_high)
 #define wait_for_init_deassert (apic->wait_for_init_deassert)
 #define smp_callin_clear_local_apic (apic->smp_callin_clear_local_apic)
 #define store_NMI_vector (apic->store_NMI_vector)
index 6f499df8eddbfd4246132bd570b87bfde68b4e00..8b6c16d8558d024c4a9e8e5dde81c88707fc4a02 100644 (file)
@@ -3,8 +3,8 @@
 
 /* This file copes with machines that wakeup secondary CPUs by NMIs */
 
-#define TRAMPOLINE_PHYS_LOW (0x8)
-#define TRAMPOLINE_PHYS_HIGH (0xa)
+#define NUMAQ_TRAMPOLINE_PHYS_LOW (0x8)
+#define NUMAQ_TRAMPOLINE_PHYS_HIGH (0xa)
 
 /* We don't do anything here because we use NMI's to boot instead */
 static inline void wait_for_init_deassert(atomic_t *deassert)
@@ -24,17 +24,17 @@ static inline void store_NMI_vector(unsigned short *high, unsigned short *low)
 {
        printk("Storing NMI vector\n");
        *high =
-         *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_HIGH));
+         *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_HIGH));
        *low =
-         *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_LOW));
+         *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_LOW));
 }
 
 static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
 {
        printk("Restoring NMI vector\n");
-       *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_HIGH)) =
+       *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_HIGH)) =
                                                                 *high;
-       *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) =
+       *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_LOW)) =
                                                                 *low;
 }
 
index 4782b55478818ca2cf4e1c82cc7806d55c36d7af..a317fbe07fdfeeab5bc88e93f1a85f964a69074c 100644 (file)
@@ -104,8 +104,8 @@ struct genapic apic_bigsmp = {
        .send_IPI_self                  = NULL,
 
        .wakeup_cpu                     = NULL,
-       .trampoline_phys_low            = TRAMPOLINE_PHYS_LOW,
-       .trampoline_phys_high           = TRAMPOLINE_PHYS_HIGH,
+       .trampoline_phys_low            = DEFAULT_TRAMPOLINE_PHYS_LOW,
+       .trampoline_phys_high           = DEFAULT_TRAMPOLINE_PHYS_HIGH,
        .wait_for_init_deassert         = wait_for_init_deassert,
        .smp_callin_clear_local_apic    = smp_callin_clear_local_apic,
        .store_NMI_vector               = store_NMI_vector,
index bf4670db25fe43d698e99a6cbca3837d0505d6d6..17d8f9c22180f12e7cf8398239ff7169b902e0a5 100644 (file)
@@ -85,8 +85,8 @@ struct genapic apic_default = {
        .send_IPI_self                  = NULL,
 
        .wakeup_cpu                     = NULL,
-       .trampoline_phys_low            = TRAMPOLINE_PHYS_LOW,
-       .trampoline_phys_high           = TRAMPOLINE_PHYS_HIGH,
+       .trampoline_phys_low            = DEFAULT_TRAMPOLINE_PHYS_LOW,
+       .trampoline_phys_high           = DEFAULT_TRAMPOLINE_PHYS_HIGH,
        .wait_for_init_deassert         = wait_for_init_deassert,
        .smp_callin_clear_local_apic    = smp_callin_clear_local_apic,
        .store_NMI_vector               = store_NMI_vector,
index d36642e6d908c44b15093ee6871aeeb7927be090..871e85445e21f939d18c8d7581e7a80b1267fe9c 100644 (file)
@@ -140,8 +140,8 @@ struct genapic apic_es7000 = {
        .send_IPI_self                  = NULL,
 
        .wakeup_cpu                     = NULL,
-       .trampoline_phys_low            = TRAMPOLINE_PHYS_LOW,
-       .trampoline_phys_high           = TRAMPOLINE_PHYS_HIGH,
+       .trampoline_phys_low            = DEFAULT_TRAMPOLINE_PHYS_LOW,
+       .trampoline_phys_high           = DEFAULT_TRAMPOLINE_PHYS_HIGH,
        .wait_for_init_deassert         = wait_for_init_deassert,
        .smp_callin_clear_local_apic    = smp_callin_clear_local_apic,
        .store_NMI_vector               = store_NMI_vector,
index 135b1832ad80372b00f1909bc4937d20ef95b264..0b496ab5450ce5ecc66402c27445fe21c8499e41 100644 (file)
@@ -104,8 +104,8 @@ struct genapic apic_numaq = {
        .send_IPI_self                  = NULL,
 
        .wakeup_cpu                     = NULL,
-       .trampoline_phys_low            = TRAMPOLINE_PHYS_LOW,
-       .trampoline_phys_high           = TRAMPOLINE_PHYS_HIGH,
+       .trampoline_phys_low            = NUMAQ_TRAMPOLINE_PHYS_LOW,
+       .trampoline_phys_high           = NUMAQ_TRAMPOLINE_PHYS_HIGH,
        .wait_for_init_deassert         = wait_for_init_deassert,
        .smp_callin_clear_local_apic    = smp_callin_clear_local_apic,
        .store_NMI_vector               = store_NMI_vector,
index 77196a4a9d2b9e03702eefd645abcbfaf4a40eea..c4799cd345926204e5422d5fec60c819837e5561 100644 (file)
@@ -84,8 +84,8 @@ struct genapic apic_summit = {
        .send_IPI_self                  = NULL,
 
        .wakeup_cpu                     = NULL,
-       .trampoline_phys_low            = TRAMPOLINE_PHYS_LOW,
-       .trampoline_phys_high           = TRAMPOLINE_PHYS_HIGH,
+       .trampoline_phys_low            = DEFAULT_TRAMPOLINE_PHYS_LOW,
+       .trampoline_phys_high           = DEFAULT_TRAMPOLINE_PHYS_HIGH,
        .wait_for_init_deassert         = wait_for_init_deassert,
        .smp_callin_clear_local_apic    = smp_callin_clear_local_apic,
        .store_NMI_vector               = store_NMI_vector,