diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-28 10:09:23 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-28 17:20:31 -0500 |
commit | 6f177c01db6b865181fbc6c948381b290ee09718 (patch) | |
tree | 6fe3dd753a9a8ba99c42452ef9cd9d98bee4315b /arch/x86 | |
parent | dac5f4121df3c39fdb2ea57acd669a0ae19e46f8 (diff) |
x86, smp: clean up ->trampoline_phys_low/high handling
- spread out the namespace on a per apic driver basis
- remove wrapper macros
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/es7000/wakecpu.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/mach_wakecpu.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/smpboot_hooks.h | 6 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-generic/mach_wakecpu.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/numaq/wakecpu.h | 12 | ||||
-rw-r--r-- | arch/x86/mach-generic/bigsmp.c | 4 | ||||
-rw-r--r-- | arch/x86/mach-generic/default.c | 4 | ||||
-rw-r--r-- | arch/x86/mach-generic/es7000.c | 4 | ||||
-rw-r--r-- | arch/x86/mach-generic/numaq.c | 4 | ||||
-rw-r--r-- | arch/x86/mach-generic/summit.c | 4 |
10 files changed, 23 insertions, 25 deletions
diff --git a/arch/x86/include/asm/es7000/wakecpu.h b/arch/x86/include/asm/es7000/wakecpu.h index 78f0daaee436..4c01be6ff80c 100644 --- a/arch/x86/include/asm/es7000/wakecpu.h +++ b/arch/x86/include/asm/es7000/wakecpu.h | |||
@@ -1,8 +1,8 @@ | |||
1 | #ifndef __ASM_ES7000_WAKECPU_H | 1 | #ifndef __ASM_ES7000_WAKECPU_H |
2 | #define __ASM_ES7000_WAKECPU_H | 2 | #define __ASM_ES7000_WAKECPU_H |
3 | 3 | ||
4 | #define TRAMPOLINE_PHYS_LOW 0x467 | 4 | #define ES7000_TRAMPOLINE_PHYS_LOW 0x467 |
5 | #define TRAMPOLINE_PHYS_HIGH 0x469 | 5 | #define ES7000_TRAMPOLINE_PHYS_HIGH 0x469 |
6 | 6 | ||
7 | static inline void wait_for_init_deassert(atomic_t *deassert) | 7 | static inline void wait_for_init_deassert(atomic_t *deassert) |
8 | { | 8 | { |
diff --git a/arch/x86/include/asm/mach-default/mach_wakecpu.h b/arch/x86/include/asm/mach-default/mach_wakecpu.h index 89897a6a65b9..0a8d7860e44b 100644 --- a/arch/x86/include/asm/mach-default/mach_wakecpu.h +++ b/arch/x86/include/asm/mach-default/mach_wakecpu.h | |||
@@ -1,8 +1,8 @@ | |||
1 | #ifndef _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H | 1 | #ifndef _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H |
2 | #define _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H | 2 | #define _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H |
3 | 3 | ||
4 | #define TRAMPOLINE_PHYS_LOW (0x467) | 4 | #define DEFAULT_TRAMPOLINE_PHYS_LOW (0x467) |
5 | #define TRAMPOLINE_PHYS_HIGH (0x469) | 5 | #define DEFAULT_TRAMPOLINE_PHYS_HIGH (0x469) |
6 | 6 | ||
7 | static inline void wait_for_init_deassert(atomic_t *deassert) | 7 | static inline void wait_for_init_deassert(atomic_t *deassert) |
8 | { | 8 | { |
diff --git a/arch/x86/include/asm/mach-default/smpboot_hooks.h b/arch/x86/include/asm/mach-default/smpboot_hooks.h index 23bf52103b89..1def60114906 100644 --- a/arch/x86/include/asm/mach-default/smpboot_hooks.h +++ b/arch/x86/include/asm/mach-default/smpboot_hooks.h | |||
@@ -13,10 +13,10 @@ static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip) | |||
13 | CMOS_WRITE(0xa, 0xf); | 13 | CMOS_WRITE(0xa, 0xf); |
14 | local_flush_tlb(); | 14 | local_flush_tlb(); |
15 | pr_debug("1.\n"); | 15 | pr_debug("1.\n"); |
16 | *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_HIGH)) = | 16 | *((volatile unsigned short *)phys_to_virt(apic->trampoline_phys_high)) = |
17 | start_eip >> 4; | 17 | start_eip >> 4; |
18 | pr_debug("2.\n"); | 18 | pr_debug("2.\n"); |
19 | *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) = | 19 | *((volatile unsigned short *)phys_to_virt(apic->trampoline_phys_low)) = |
20 | start_eip & 0xf; | 20 | start_eip & 0xf; |
21 | pr_debug("3.\n"); | 21 | pr_debug("3.\n"); |
22 | } | 22 | } |
@@ -34,7 +34,7 @@ static inline void smpboot_restore_warm_reset_vector(void) | |||
34 | */ | 34 | */ |
35 | CMOS_WRITE(0, 0xf); | 35 | CMOS_WRITE(0, 0xf); |
36 | 36 | ||
37 | *((volatile long *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) = 0; | 37 | *((volatile long *)phys_to_virt(apic->trampoline_phys_low)) = 0; |
38 | } | 38 | } |
39 | 39 | ||
40 | static inline void __init smpboot_setup_io_apic(void) | 40 | static inline void __init smpboot_setup_io_apic(void) |
diff --git a/arch/x86/include/asm/mach-generic/mach_wakecpu.h b/arch/x86/include/asm/mach-generic/mach_wakecpu.h index 22006bbee617..2031377a954c 100644 --- a/arch/x86/include/asm/mach-generic/mach_wakecpu.h +++ b/arch/x86/include/asm/mach-generic/mach_wakecpu.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H | 1 | #ifndef _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H |
2 | #define _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H | 2 | #define _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H |
3 | 3 | ||
4 | #define TRAMPOLINE_PHYS_LOW (apic->trampoline_phys_low) | ||
5 | #define TRAMPOLINE_PHYS_HIGH (apic->trampoline_phys_high) | ||
6 | #define wait_for_init_deassert (apic->wait_for_init_deassert) | 4 | #define wait_for_init_deassert (apic->wait_for_init_deassert) |
7 | #define smp_callin_clear_local_apic (apic->smp_callin_clear_local_apic) | 5 | #define smp_callin_clear_local_apic (apic->smp_callin_clear_local_apic) |
8 | #define store_NMI_vector (apic->store_NMI_vector) | 6 | #define store_NMI_vector (apic->store_NMI_vector) |
diff --git a/arch/x86/include/asm/numaq/wakecpu.h b/arch/x86/include/asm/numaq/wakecpu.h index 6f499df8eddb..8b6c16d8558d 100644 --- a/arch/x86/include/asm/numaq/wakecpu.h +++ b/arch/x86/include/asm/numaq/wakecpu.h | |||
@@ -3,8 +3,8 @@ | |||
3 | 3 | ||
4 | /* This file copes with machines that wakeup secondary CPUs by NMIs */ | 4 | /* This file copes with machines that wakeup secondary CPUs by NMIs */ |
5 | 5 | ||
6 | #define TRAMPOLINE_PHYS_LOW (0x8) | 6 | #define NUMAQ_TRAMPOLINE_PHYS_LOW (0x8) |
7 | #define TRAMPOLINE_PHYS_HIGH (0xa) | 7 | #define NUMAQ_TRAMPOLINE_PHYS_HIGH (0xa) |
8 | 8 | ||
9 | /* We don't do anything here because we use NMI's to boot instead */ | 9 | /* We don't do anything here because we use NMI's to boot instead */ |
10 | static inline void wait_for_init_deassert(atomic_t *deassert) | 10 | 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) | |||
24 | { | 24 | { |
25 | printk("Storing NMI vector\n"); | 25 | printk("Storing NMI vector\n"); |
26 | *high = | 26 | *high = |
27 | *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_HIGH)); | 27 | *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_HIGH)); |
28 | *low = | 28 | *low = |
29 | *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_LOW)); | 29 | *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_LOW)); |
30 | } | 30 | } |
31 | 31 | ||
32 | static inline void restore_NMI_vector(unsigned short *high, unsigned short *low) | 32 | static inline void restore_NMI_vector(unsigned short *high, unsigned short *low) |
33 | { | 33 | { |
34 | printk("Restoring NMI vector\n"); | 34 | printk("Restoring NMI vector\n"); |
35 | *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_HIGH)) = | 35 | *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_HIGH)) = |
36 | *high; | 36 | *high; |
37 | *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) = | 37 | *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_LOW)) = |
38 | *low; | 38 | *low; |
39 | } | 39 | } |
40 | 40 | ||
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c index 4782b5547881..a317fbe07fdf 100644 --- a/arch/x86/mach-generic/bigsmp.c +++ b/arch/x86/mach-generic/bigsmp.c | |||
@@ -104,8 +104,8 @@ struct genapic apic_bigsmp = { | |||
104 | .send_IPI_self = NULL, | 104 | .send_IPI_self = NULL, |
105 | 105 | ||
106 | .wakeup_cpu = NULL, | 106 | .wakeup_cpu = NULL, |
107 | .trampoline_phys_low = TRAMPOLINE_PHYS_LOW, | 107 | .trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW, |
108 | .trampoline_phys_high = TRAMPOLINE_PHYS_HIGH, | 108 | .trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH, |
109 | .wait_for_init_deassert = wait_for_init_deassert, | 109 | .wait_for_init_deassert = wait_for_init_deassert, |
110 | .smp_callin_clear_local_apic = smp_callin_clear_local_apic, | 110 | .smp_callin_clear_local_apic = smp_callin_clear_local_apic, |
111 | .store_NMI_vector = store_NMI_vector, | 111 | .store_NMI_vector = store_NMI_vector, |
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c index bf4670db25fe..17d8f9c22180 100644 --- a/arch/x86/mach-generic/default.c +++ b/arch/x86/mach-generic/default.c | |||
@@ -85,8 +85,8 @@ struct genapic apic_default = { | |||
85 | .send_IPI_self = NULL, | 85 | .send_IPI_self = NULL, |
86 | 86 | ||
87 | .wakeup_cpu = NULL, | 87 | .wakeup_cpu = NULL, |
88 | .trampoline_phys_low = TRAMPOLINE_PHYS_LOW, | 88 | .trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW, |
89 | .trampoline_phys_high = TRAMPOLINE_PHYS_HIGH, | 89 | .trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH, |
90 | .wait_for_init_deassert = wait_for_init_deassert, | 90 | .wait_for_init_deassert = wait_for_init_deassert, |
91 | .smp_callin_clear_local_apic = smp_callin_clear_local_apic, | 91 | .smp_callin_clear_local_apic = smp_callin_clear_local_apic, |
92 | .store_NMI_vector = store_NMI_vector, | 92 | .store_NMI_vector = store_NMI_vector, |
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c index d36642e6d908..871e85445e21 100644 --- a/arch/x86/mach-generic/es7000.c +++ b/arch/x86/mach-generic/es7000.c | |||
@@ -140,8 +140,8 @@ struct genapic apic_es7000 = { | |||
140 | .send_IPI_self = NULL, | 140 | .send_IPI_self = NULL, |
141 | 141 | ||
142 | .wakeup_cpu = NULL, | 142 | .wakeup_cpu = NULL, |
143 | .trampoline_phys_low = TRAMPOLINE_PHYS_LOW, | 143 | .trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW, |
144 | .trampoline_phys_high = TRAMPOLINE_PHYS_HIGH, | 144 | .trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH, |
145 | .wait_for_init_deassert = wait_for_init_deassert, | 145 | .wait_for_init_deassert = wait_for_init_deassert, |
146 | .smp_callin_clear_local_apic = smp_callin_clear_local_apic, | 146 | .smp_callin_clear_local_apic = smp_callin_clear_local_apic, |
147 | .store_NMI_vector = store_NMI_vector, | 147 | .store_NMI_vector = store_NMI_vector, |
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c index 135b1832ad80..0b496ab5450c 100644 --- a/arch/x86/mach-generic/numaq.c +++ b/arch/x86/mach-generic/numaq.c | |||
@@ -104,8 +104,8 @@ struct genapic apic_numaq = { | |||
104 | .send_IPI_self = NULL, | 104 | .send_IPI_self = NULL, |
105 | 105 | ||
106 | .wakeup_cpu = NULL, | 106 | .wakeup_cpu = NULL, |
107 | .trampoline_phys_low = TRAMPOLINE_PHYS_LOW, | 107 | .trampoline_phys_low = NUMAQ_TRAMPOLINE_PHYS_LOW, |
108 | .trampoline_phys_high = TRAMPOLINE_PHYS_HIGH, | 108 | .trampoline_phys_high = NUMAQ_TRAMPOLINE_PHYS_HIGH, |
109 | .wait_for_init_deassert = wait_for_init_deassert, | 109 | .wait_for_init_deassert = wait_for_init_deassert, |
110 | .smp_callin_clear_local_apic = smp_callin_clear_local_apic, | 110 | .smp_callin_clear_local_apic = smp_callin_clear_local_apic, |
111 | .store_NMI_vector = store_NMI_vector, | 111 | .store_NMI_vector = store_NMI_vector, |
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c index 77196a4a9d2b..c4799cd34592 100644 --- a/arch/x86/mach-generic/summit.c +++ b/arch/x86/mach-generic/summit.c | |||
@@ -84,8 +84,8 @@ struct genapic apic_summit = { | |||
84 | .send_IPI_self = NULL, | 84 | .send_IPI_self = NULL, |
85 | 85 | ||
86 | .wakeup_cpu = NULL, | 86 | .wakeup_cpu = NULL, |
87 | .trampoline_phys_low = TRAMPOLINE_PHYS_LOW, | 87 | .trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW, |
88 | .trampoline_phys_high = TRAMPOLINE_PHYS_HIGH, | 88 | .trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH, |
89 | .wait_for_init_deassert = wait_for_init_deassert, | 89 | .wait_for_init_deassert = wait_for_init_deassert, |
90 | .smp_callin_clear_local_apic = smp_callin_clear_local_apic, | 90 | .smp_callin_clear_local_apic = smp_callin_clear_local_apic, |
91 | .store_NMI_vector = store_NMI_vector, | 91 | .store_NMI_vector = store_NMI_vector, |