summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-28 16:31:52 +0100
committerIngo Molnar <mingo@elte.hu>2009-01-28 23:20:33 +0100
commit333344d94300500e401cffb4eea10a5ab6e5a41d (patch)
tree21dd26c49dfba195a03e2fa860fe4d3123ca3de8
parenta965936643e28af8152d9e960b966baa1a5588a2 (diff)
x86, smp: refactor ->smp_callin_clear_local_apic() methods
Only NUMAQ does something substantial here, because it initializes via NMIs (not via INIT as standard SMP startup) - so it needs to reset the APIC. - 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.h5
-rw-r--r--arch/x86/include/asm/mach-default/mach_wakecpu.h5
-rw-r--r--arch/x86/include/asm/mach-generic/mach_wakecpu.h1
-rw-r--r--arch/x86/include/asm/numaq/wakecpu.h4
-rw-r--r--arch/x86/kernel/smpboot.c3
-rw-r--r--arch/x86/mach-generic/bigsmp.c3
-rw-r--r--arch/x86/mach-generic/default.c2
-rw-r--r--arch/x86/mach-generic/es7000.c4
-rw-r--r--arch/x86/mach-generic/numaq.c2
-rw-r--r--arch/x86/mach-generic/summit.c3
10 files changed, 13 insertions, 19 deletions
diff --git a/arch/x86/include/asm/es7000/wakecpu.h b/arch/x86/include/asm/es7000/wakecpu.h
index 5c4d05f46d2d..e8e03962633b 100644
--- a/arch/x86/include/asm/es7000/wakecpu.h
+++ b/arch/x86/include/asm/es7000/wakecpu.h
@@ -13,11 +13,6 @@ static inline void es7000_wait_for_init_deassert(atomic_t *deassert)
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)
{
}
diff --git a/arch/x86/include/asm/mach-default/mach_wakecpu.h b/arch/x86/include/asm/mach-default/mach_wakecpu.h
index 1d34c69a758b..d059807cd7e8 100644
--- a/arch/x86/include/asm/mach-default/mach_wakecpu.h
+++ b/arch/x86/include/asm/mach-default/mach_wakecpu.h
@@ -8,11 +8,6 @@ static inline void default_wait_for_init_deassert(atomic_t *deassert)
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)
{
}
diff --git a/arch/x86/include/asm/mach-generic/mach_wakecpu.h b/arch/x86/include/asm/mach-generic/mach_wakecpu.h
index 58e54122f730..30515a154d8e 100644
--- a/arch/x86/include/asm/mach-generic/mach_wakecpu.h
+++ b/arch/x86/include/asm/mach-generic/mach_wakecpu.h
@@ -1,7 +1,6 @@
#ifndef _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H
#define _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H
-#define smp_callin_clear_local_apic (apic->smp_callin_clear_local_apic)
#define store_NMI_vector (apic->store_NMI_vector)
#define restore_NMI_vector (apic->restore_NMI_vector)
#define inquire_remote_apic (apic->inquire_remote_apic)
diff --git a/arch/x86/include/asm/numaq/wakecpu.h b/arch/x86/include/asm/numaq/wakecpu.h
index 884b95cf5846..61d0a7d96136 100644
--- a/arch/x86/include/asm/numaq/wakecpu.h
+++ b/arch/x86/include/asm/numaq/wakecpu.h
@@ -8,9 +8,9 @@
/*
* Because we use NMIs rather than the INIT-STARTUP sequence to
- * bootstrap the CPUs, the APIC may be in a weird state. Kick it.
+ * bootstrap the CPUs, the APIC may be in a weird state. Kick it:
*/
-static inline void smp_callin_clear_local_apic(void)
+static inline void numaq_smp_callin_clear_local_apic(void)
{
clear_local_APIC();
}
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 558af378a61d..10873a46b299 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -244,7 +244,8 @@ static void __cpuinit smp_callin(void)
*/
pr_debug("CALLIN, before setup_local_APIC().\n");
- smp_callin_clear_local_apic();
+ if (apic->smp_callin_clear_local_apic)
+ apic->smp_callin_clear_local_apic();
setup_local_APIC();
end_local_APIC_setup();
map_cpu_to_logical_apicid();
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c
index 40910bfd1b42..bd069e7b521c 100644
--- a/arch/x86/mach-generic/bigsmp.c
+++ b/arch/x86/mach-generic/bigsmp.c
@@ -109,7 +109,8 @@ struct genapic apic_bigsmp = {
.wait_for_init_deassert = default_wait_for_init_deassert,
- .smp_callin_clear_local_apic = smp_callin_clear_local_apic,
+ .smp_callin_clear_local_apic = NULL,
+
.store_NMI_vector = store_NMI_vector,
.restore_NMI_vector = restore_NMI_vector,
.inquire_remote_apic = inquire_remote_apic,
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c
index c2464843df9e..a25e6eff048f 100644
--- a/arch/x86/mach-generic/default.c
+++ b/arch/x86/mach-generic/default.c
@@ -90,7 +90,7 @@ struct genapic apic_default = {
.wait_for_init_deassert = default_wait_for_init_deassert,
- .smp_callin_clear_local_apic = smp_callin_clear_local_apic,
+ .smp_callin_clear_local_apic = NULL,
.store_NMI_vector = store_NMI_vector,
.restore_NMI_vector = restore_NMI_vector,
.inquire_remote_apic = inquire_remote_apic,
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c
index 4cb3984834ed..ab41b5439145 100644
--- a/arch/x86/mach-generic/es7000.c
+++ b/arch/x86/mach-generic/es7000.c
@@ -145,7 +145,9 @@ struct genapic apic_es7000 = {
.wait_for_init_deassert = default_wait_for_init_deassert,
- .smp_callin_clear_local_apic = smp_callin_clear_local_apic,
+ /* Nothing to do for most platforms, since cleared by the INIT cycle: */
+ .smp_callin_clear_local_apic = NULL,
+
.store_NMI_vector = store_NMI_vector,
.restore_NMI_vector = restore_NMI_vector,
.inquire_remote_apic = inquire_remote_apic,
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c
index fb03867e7c0f..4d3924f8cd0b 100644
--- a/arch/x86/mach-generic/numaq.c
+++ b/arch/x86/mach-generic/numaq.c
@@ -110,7 +110,7 @@ struct genapic apic_numaq = {
/* We don't do anything here because we use NMI's to boot instead */
.wait_for_init_deassert = NULL,
- .smp_callin_clear_local_apic = smp_callin_clear_local_apic,
+ .smp_callin_clear_local_apic = numaq_smp_callin_clear_local_apic,
.store_NMI_vector = store_NMI_vector,
.restore_NMI_vector = restore_NMI_vector,
.inquire_remote_apic = inquire_remote_apic,
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c
index fdca78b96b6a..2595baa7997e 100644
--- a/arch/x86/mach-generic/summit.c
+++ b/arch/x86/mach-generic/summit.c
@@ -89,7 +89,8 @@ struct genapic apic_summit = {
.wait_for_init_deassert = default_wait_for_init_deassert,
- .smp_callin_clear_local_apic = smp_callin_clear_local_apic,
+ .smp_callin_clear_local_apic = NULL,
+
.store_NMI_vector = store_NMI_vector,
.restore_NMI_vector = restore_NMI_vector,
.inquire_remote_apic = inquire_remote_apic,