diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-28 10:31:52 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-28 17:20:34 -0500 |
commit | 25dc004903a38f0b6f6626dbbab058c8709c5398 (patch) | |
tree | 81c0a02f81e67946977fe45c0d4d587be2935f63 | |
parent | 3d5f597e938c425554cb7668fd3c9d6a536a984a (diff) |
x86, smp: refactor ->inquire_remote_apic() methods
Nothing exciting - a few subarches dont want APIC remote reads to
be performed - the others are content with the default method.
- extend the generic code to handle NULL methods
- clear out dummy methods and replace them with NULL
- clean up: remove wrapper macros, etc.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/include/asm/es7000/wakecpu.h | 8 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/mach_wakecpu.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-generic/mach_wakecpu.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/numaq/wakecpu.h | 4 | ||||
-rw-r--r-- | arch/x86/kernel/smpboot.c | 4 | ||||
-rw-r--r-- | arch/x86/mach-generic/bigsmp.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-generic/default.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-generic/es7000.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-generic/numaq.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-generic/summit.c | 2 |
10 files changed, 8 insertions, 22 deletions
diff --git a/arch/x86/include/asm/es7000/wakecpu.h b/arch/x86/include/asm/es7000/wakecpu.h index 71a3a412d0e4..99c72be1840e 100644 --- a/arch/x86/include/asm/es7000/wakecpu.h +++ b/arch/x86/include/asm/es7000/wakecpu.h | |||
@@ -13,12 +13,4 @@ static inline void es7000_wait_for_init_deassert(atomic_t *deassert) | |||
13 | return; | 13 | return; |
14 | } | 14 | } |
15 | 15 | ||
16 | extern void __inquire_remote_apic(int apicid); | ||
17 | |||
18 | static inline void inquire_remote_apic(int apicid) | ||
19 | { | ||
20 | if (apic_verbosity >= APIC_DEBUG) | ||
21 | __inquire_remote_apic(apicid); | ||
22 | } | ||
23 | |||
24 | #endif /* __ASM_MACH_WAKECPU_H */ | 16 | #endif /* __ASM_MACH_WAKECPU_H */ |
diff --git a/arch/x86/include/asm/mach-default/mach_wakecpu.h b/arch/x86/include/asm/mach-default/mach_wakecpu.h index 656bb5e52bcc..b1cde560e4c1 100644 --- a/arch/x86/include/asm/mach-default/mach_wakecpu.h +++ b/arch/x86/include/asm/mach-default/mach_wakecpu.h | |||
@@ -16,7 +16,7 @@ static inline void __inquire_remote_apic(int apicid) | |||
16 | } | 16 | } |
17 | #endif /* CONFIG_SMP */ | 17 | #endif /* CONFIG_SMP */ |
18 | 18 | ||
19 | static inline void inquire_remote_apic(int apicid) | 19 | static inline void default_inquire_remote_apic(int apicid) |
20 | { | 20 | { |
21 | if (apic_verbosity >= APIC_DEBUG) | 21 | if (apic_verbosity >= APIC_DEBUG) |
22 | __inquire_remote_apic(apicid); | 22 | __inquire_remote_apic(apicid); |
diff --git a/arch/x86/include/asm/mach-generic/mach_wakecpu.h b/arch/x86/include/asm/mach-generic/mach_wakecpu.h index 93207dfe8f50..0b884c03a3fc 100644 --- a/arch/x86/include/asm/mach-generic/mach_wakecpu.h +++ b/arch/x86/include/asm/mach-generic/mach_wakecpu.h | |||
@@ -1,6 +1,4 @@ | |||
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 inquire_remote_apic (apic->inquire_remote_apic) | ||
5 | |||
6 | #endif /* _ASM_X86_MACH_GENERIC_MACH_APIC_H */ | 4 | #endif /* _ASM_X86_MACH_GENERIC_MACH_APIC_H */ |
diff --git a/arch/x86/include/asm/numaq/wakecpu.h b/arch/x86/include/asm/numaq/wakecpu.h index 920dcfefa83a..afe81439c7db 100644 --- a/arch/x86/include/asm/numaq/wakecpu.h +++ b/arch/x86/include/asm/numaq/wakecpu.h | |||
@@ -25,8 +25,4 @@ numaq_store_NMI_vector(unsigned short *high, unsigned short *low) | |||
25 | *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_LOW)); | 25 | *((volatile unsigned short *)phys_to_virt(NUMAQ_TRAMPOLINE_PHYS_LOW)); |
26 | } | 26 | } |
27 | 27 | ||
28 | static inline void inquire_remote_apic(int apicid) | ||
29 | { | ||
30 | } | ||
31 | |||
32 | #endif /* __ASM_NUMAQ_WAKECPU_H */ | 28 | #endif /* __ASM_NUMAQ_WAKECPU_H */ |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 1492024592ff..170adc5b6cb3 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -876,8 +876,8 @@ do_rest: | |||
876 | else | 876 | else |
877 | /* trampoline code not run */ | 877 | /* trampoline code not run */ |
878 | printk(KERN_ERR "Not responding.\n"); | 878 | printk(KERN_ERR "Not responding.\n"); |
879 | if (get_uv_system_type() != UV_NON_UNIQUE_APIC) | 879 | if (apic->inquire_remote_apic) |
880 | inquire_remote_apic(apicid); | 880 | apic->inquire_remote_apic(apicid); |
881 | } | 881 | } |
882 | } | 882 | } |
883 | 883 | ||
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c index d9377af88cb3..4d8b2d442bae 100644 --- a/arch/x86/mach-generic/bigsmp.c +++ b/arch/x86/mach-generic/bigsmp.c | |||
@@ -111,5 +111,5 @@ struct genapic apic_bigsmp = { | |||
111 | 111 | ||
112 | .smp_callin_clear_local_apic = NULL, | 112 | .smp_callin_clear_local_apic = NULL, |
113 | .store_NMI_vector = NULL, | 113 | .store_NMI_vector = NULL, |
114 | .inquire_remote_apic = inquire_remote_apic, | 114 | .inquire_remote_apic = default_inquire_remote_apic, |
115 | }; | 115 | }; |
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c index b004257035c7..c12dd2300a59 100644 --- a/arch/x86/mach-generic/default.c +++ b/arch/x86/mach-generic/default.c | |||
@@ -92,5 +92,5 @@ struct genapic apic_default = { | |||
92 | 92 | ||
93 | .smp_callin_clear_local_apic = NULL, | 93 | .smp_callin_clear_local_apic = NULL, |
94 | .store_NMI_vector = NULL, | 94 | .store_NMI_vector = NULL, |
95 | .inquire_remote_apic = inquire_remote_apic, | 95 | .inquire_remote_apic = default_inquire_remote_apic, |
96 | }; | 96 | }; |
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c index 62673a8002ff..be090b2037ca 100644 --- a/arch/x86/mach-generic/es7000.c +++ b/arch/x86/mach-generic/es7000.c | |||
@@ -148,5 +148,5 @@ struct genapic apic_es7000 = { | |||
148 | /* Nothing to do for most platforms, since cleared by the INIT cycle: */ | 148 | /* Nothing to do for most platforms, since cleared by the INIT cycle: */ |
149 | .smp_callin_clear_local_apic = NULL, | 149 | .smp_callin_clear_local_apic = NULL, |
150 | .store_NMI_vector = NULL, | 150 | .store_NMI_vector = NULL, |
151 | .inquire_remote_apic = inquire_remote_apic, | 151 | .inquire_remote_apic = default_inquire_remote_apic, |
152 | }; | 152 | }; |
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c index 2c3341564d14..ddb50fba2868 100644 --- a/arch/x86/mach-generic/numaq.c +++ b/arch/x86/mach-generic/numaq.c | |||
@@ -112,5 +112,5 @@ struct genapic apic_numaq = { | |||
112 | 112 | ||
113 | .smp_callin_clear_local_apic = numaq_smp_callin_clear_local_apic, | 113 | .smp_callin_clear_local_apic = numaq_smp_callin_clear_local_apic, |
114 | .store_NMI_vector = numaq_store_NMI_vector, | 114 | .store_NMI_vector = numaq_store_NMI_vector, |
115 | .inquire_remote_apic = inquire_remote_apic, | 115 | .inquire_remote_apic = NULL, |
116 | }; | 116 | }; |
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c index c2471a9fa8f3..d5db3045437c 100644 --- a/arch/x86/mach-generic/summit.c +++ b/arch/x86/mach-generic/summit.c | |||
@@ -91,5 +91,5 @@ struct genapic apic_summit = { | |||
91 | 91 | ||
92 | .smp_callin_clear_local_apic = NULL, | 92 | .smp_callin_clear_local_apic = NULL, |
93 | .store_NMI_vector = NULL, | 93 | .store_NMI_vector = NULL, |
94 | .inquire_remote_apic = inquire_remote_apic, | 94 | .inquire_remote_apic = default_inquire_remote_apic, |
95 | }; | 95 | }; |