]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
x86, smp: refactor ->smp_callin_clear_local_apic() methods
authorIngo Molnar <mingo@elte.hu>
Wed, 28 Jan 2009 15:31:52 +0000 (16:31 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 28 Jan 2009 22:20:33 +0000 (23:20 +0100)
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>
arch/x86/include/asm/es7000/wakecpu.h
arch/x86/include/asm/mach-default/mach_wakecpu.h
arch/x86/include/asm/mach-generic/mach_wakecpu.h
arch/x86/include/asm/numaq/wakecpu.h
arch/x86/kernel/smpboot.c
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 5c4d05f46d2d396aefb1cdad2f8c9d843b1096d9..e8e03962633b696c478af9ab57d25adc8885d68d 100644 (file)
@@ -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)
 {
 }
index 1d34c69a758b81bd117eff2996a020aaf6208cc5..d059807cd7e8c4d54af78a165644bdc9e72fb911 100644 (file)
@@ -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)
 {
 }
index 58e54122f7301320adc9683f1eeb1080bf9f1927..30515a154d8ecfd588100b841163bbee38595375 100644 (file)
@@ -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)
index 884b95cf5846ef503bb561c299383e592b5baa86..61d0a7d961360e626be283e720c5a1850aee44c2 100644 (file)
@@ -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();
 }
index 558af378a61df9c8548a8957be8fdd72cfb99c55..10873a46b29989d8bcfa32dde7836b5ca0d0ea06 100644 (file)
@@ -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();
index 40910bfd1b42f7d7e6cd34c01a899c1624fdc15d..bd069e7b521c306d268c06efd90cb84bbd6bffad 100644 (file)
@@ -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,
index c2464843df9e6906adaddd43b8a67f151d6585c7..a25e6eff048f4dd5da7c22dc0c8f90ce55d9932d 100644 (file)
@@ -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,
index 4cb3984834ed7fd1a8f6373dad3a76810e33d15f..ab41b543914544f654f8ee68626034b33985dec7 100644 (file)
@@ -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,
index fb03867e7c0f636775c1b26d3735019770fff107..4d3924f8cd0bc6b037afc1daa286f924cc80b9ba 100644 (file)
@@ -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,
index fdca78b96b6a984812b985d328769c4a8b907d5b..2595baa7997e3248270fa58a7a6a3c404362f786 100644 (file)
@@ -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,