]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: refactor ->enable_apic_mode() subarch methods
authorIngo Molnar <mingo@elte.hu>
Wed, 28 Jan 2009 11:43:18 +0000 (12:43 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 28 Jan 2009 22:20:26 +0000 (23:20 +0100)
Only ES7000 has a real ->enable_apic_mode() method, the other
subarchitectures define it but keep it empty.

So mark the vector as NULL, extend the generic code to handle
NULL -setup_portio_remap() entries and remove all the empty
handlers.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/include/asm/bigsmp/apic.h
arch/x86/include/asm/mach-default/mach_apic.h
arch/x86/include/asm/mach-generic/mach_apic.h
arch/x86/include/asm/numaq/apic.h
arch/x86/include/asm/summit/apic.h
arch/x86/kernel/apic.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 5ba4118fcdf270b4251bd9101dfc901ee1dc2b22..f49d440862f1b903634a03ca9b9d9f29b7a1c1e2 100644 (file)
@@ -104,10 +104,6 @@ static inline int bigsmp_check_phys_apicid_present(int boot_cpu_physical_apicid)
        return 1;
 }
 
-static inline void enable_apic_mode(void)
-{
-}
-
 /* As we are using single CPU as destination, pick only one CPU here */
 static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask)
 {
index 0a824d3a223828b3ababcd5e981dc5561996cbdd..3647c92d45e5d94ef34b39e1906055fe1f1f1e0d 100644 (file)
@@ -145,8 +145,5 @@ static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid)
        return physid_mask_of_physid(phys_apicid);
 }
 
-static inline void enable_apic_mode(void)
-{
-}
 #endif /* CONFIG_X86_LOCAL_APIC */
 #endif /* _ASM_X86_MACH_DEFAULT_MACH_APIC_H */
index efd762d951ac4078a32785a391e5b0359795b869..6fed521585c43a9db6581ff422b6a38dd0e3e686 100644 (file)
@@ -5,7 +5,6 @@
 
 #define cpu_mask_to_apicid (apic->cpu_mask_to_apicid)
 #define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and)
-#define enable_apic_mode (apic->enable_apic_mode)
 #define phys_pkg_id (apic->phys_pkg_id)
 #define wakeup_secondary_cpu (apic->wakeup_cpu)
 
index 3be735e2ab90bfcf8d36aead4a0f80d1609424ad..dc93c30972e7a6a727a1b87fbd7ddd3399454d64 100644 (file)
@@ -97,10 +97,6 @@ static inline int numaq_check_phys_apicid_present(int boot_cpu_physical_apicid)
        return 1;
 }
 
-static inline void enable_apic_mode(void)
-{
-}
-
 /*
  * We use physical apicids here, not logical, so just return the default
  * physical broadcast to stop people from breaking us
index fe578f6df78246be6978fa285c3427adaa8dd71a..526d19e79447dc45090e8d0a156b3bae5eadcec6 100644 (file)
@@ -125,10 +125,6 @@ static inline int summit_check_phys_apicid_present(int boot_cpu_physical_apicid)
        return 1;
 }
 
-static inline void enable_apic_mode(void)
-{
-}
-
 static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask)
 {
        int num_bits_set;
index fcbcc03cd4bd83f57b41cc7f21f3f6f94d02fce1..9d6374da47844279f74de6d22918504ca9d2e705 100644 (file)
@@ -1763,7 +1763,8 @@ void __init connect_bsp_APIC(void)
                outb(0x01, 0x23);
        }
 #endif
-       enable_apic_mode();
+       if (apic->enable_apic_mode)
+               apic->enable_apic_mode();
 }
 
 /**
index 82743d16c23d278355b09cddb68a11a69512a386..e151b472456fede4eb5a0c4a9a0512c2983d5a8b 100644 (file)
@@ -86,7 +86,7 @@ struct genapic apic_bigsmp = {
        .apicid_to_cpu_present          = bigsmp_apicid_to_cpu_present,
        .setup_portio_remap             = NULL,
        .check_phys_apicid_present      = bigsmp_check_phys_apicid_present,
-       .enable_apic_mode               = enable_apic_mode,
+       .enable_apic_mode               = NULL,
        .phys_pkg_id                    = phys_pkg_id,
        .mps_oem_check                  = mps_oem_check,
 
index d0374c69ad01ba761f40ada1b951aed1cf0583f5..ac6be195b977f3eb80e257b03f17b1cd748a832c 100644 (file)
@@ -67,7 +67,7 @@ struct genapic apic_default = {
        .apicid_to_cpu_present          = default_apicid_to_cpu_present,
        .setup_portio_remap             = NULL,
        .check_phys_apicid_present      = default_check_phys_apicid_present,
-       .enable_apic_mode               = enable_apic_mode,
+       .enable_apic_mode               = NULL,
        .phys_pkg_id                    = phys_pkg_id,
        .mps_oem_check                  = mps_oem_check,
 
index 52b3eb5e645f43022b5d0489a70b10a87b510b59..9acb71120ef61164a838b11b0f8f5a47acf472c1 100644 (file)
@@ -36,10 +36,10 @@ static int probe_es7000(void)
 }
 
 extern void es7000_sw_apic(void);
-static void __init enable_apic_mode(void)
+
+static void __init es7000_enable_apic_mode(void)
 {
        es7000_sw_apic();
-       return;
 }
 
 static __init int
@@ -128,7 +128,7 @@ struct genapic apic_es7000 = {
        .apicid_to_cpu_present          = es7000_apicid_to_cpu_present,
        .setup_portio_remap             = NULL,
        .check_phys_apicid_present      = es7000_check_phys_apicid_present,
-       .enable_apic_mode               = enable_apic_mode,
+       .enable_apic_mode               = es7000_enable_apic_mode,
        .phys_pkg_id                    = phys_pkg_id,
        .mps_oem_check                  = mps_oem_check,
 
index 7ec2ca43ca20af82fdebb10fb9f9d6b543496d67..8d3358de3fe7d2ee1f4fc662a51f480725ec3d59 100644 (file)
@@ -86,7 +86,7 @@ struct genapic apic_numaq = {
        .apicid_to_cpu_present          = numaq_apicid_to_cpu_present,
        .setup_portio_remap             = numaq_setup_portio_remap,
        .check_phys_apicid_present      = numaq_check_phys_apicid_present,
-       .enable_apic_mode               = enable_apic_mode,
+       .enable_apic_mode               = NULL,
        .phys_pkg_id                    = phys_pkg_id,
        .mps_oem_check                  = mps_oem_check,
 
index acf12de8916f3eb28a3fc1a3504807aefebdd291..cb83bcbb2dece852e61f2e5409e9de6858a4f3c4 100644 (file)
@@ -66,7 +66,7 @@ struct genapic apic_summit = {
        .apicid_to_cpu_present          = summit_apicid_to_cpu_present,
        .setup_portio_remap             = NULL,
        .check_phys_apicid_present      = summit_check_phys_apicid_present,
-       .enable_apic_mode               = enable_apic_mode,
+       .enable_apic_mode               = NULL,
        .phys_pkg_id                    = phys_pkg_id,
        .mps_oem_check                  = mps_oem_check,