x86, apic: clean up target_cpus methods
authorIngo Molnar <mingo@elte.hu>
Wed, 28 Jan 2009 03:30:40 +0000 (04:30 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 28 Jan 2009 22:20:17 +0000 (23:20 +0100)
Impact: cleanup

Clean up all the target_cpus() namespace overlap that exists
between bigsmp, es7000, mach-default, numaq and summit - by
separating the different functions into different names.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/include/asm/bigsmp/apic.h
arch/x86/include/asm/es7000/apic.h
arch/x86/include/asm/mach-default/mach_apic.h
arch/x86/include/asm/numaq/apic.h
arch/x86/include/asm/summit/apic.h
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 dca2d5b01daa6bbe008964b235761956102452d7..d6aeca3c5a8d0721363f0121f64bd528adc40288 100644 (file)
@@ -9,7 +9,7 @@ static inline int bigsmp_apic_id_registered(void)
        return 1;
 }
 
-static inline const cpumask_t *target_cpus(void)
+static inline const cpumask_t *bigsmp_target_cpus(void)
 {
 #ifdef CONFIG_SMP
        return &cpu_online_map;
index 342416b3faddfd2b0e74b89d41a6d53a1be28898..7e5c31a4f8da57f8a5427b0d6e2c5cdb245a14bd 100644 (file)
@@ -16,7 +16,7 @@ static inline const cpumask_t *target_cpus_cluster(void)
        return &CPU_MASK_ALL;
 }
 
-static inline const cpumask_t *target_cpus(void)
+static inline const cpumask_t *es7000_target_cpus(void)
 {
        return &cpumask_of_cpu(smp_processor_id());
 }
@@ -83,7 +83,7 @@ static inline void setup_apic_routing(void)
        printk("Enabling APIC mode:  %s. Using %d I/O APICs, target cpus %lx\n",
                (apic_version[apic] == 0x14) ?
                        "Physical Cluster" : "Logical Cluster",
-                       nr_ioapics, cpus_addr(*target_cpus())[0]);
+                       nr_ioapics, cpus_addr(*es7000_target_cpus())[0]);
 }
 
 static inline int multi_timer_check(int apic, int irq)
index ce3bc4845b98e099735cff0d405902b94366b040..af1607ddd2a233e511d070cb54bfa4ec68eaa408 100644 (file)
@@ -8,7 +8,7 @@
 
 #define APIC_DFR_VALUE (APIC_DFR_FLAT)
 
-static inline const struct cpumask *target_cpus(void)
+static inline const struct cpumask *default_target_cpus(void)
 { 
 #ifdef CONFIG_SMP
        return cpu_online_mask;
@@ -33,7 +33,7 @@ static inline const struct cpumask *target_cpus(void)
 #define wakeup_secondary_cpu (apic->wakeup_cpu)
 extern void setup_apic_routing(void);
 #else
-#define TARGET_CPUS (target_cpus())
+#define TARGET_CPUS (default_target_cpus())
 #define wakeup_secondary_cpu wakeup_secondary_cpu_via_init
 /*
  * Set up the logical destination ID.
index a9d846769a0228cf316be3a67e71bc6417b410d4..1111ff9e41de3ab48248cc4d6ebfa7e8595b9cae 100644 (file)
@@ -7,7 +7,7 @@
 
 #define APIC_DFR_VALUE (APIC_DFR_CLUSTER)
 
-static inline const cpumask_t *target_cpus(void)
+static inline const cpumask_t *numaq_target_cpus(void)
 {
        return &CPU_MASK_ALL;
 }
index 427d0889f6f219cde10356bcc3247bb6b6645a9e..7c1f9151429cb78aa4522947d252d1a0931435b1 100644 (file)
@@ -15,7 +15,7 @@
 
 #define APIC_DFR_VALUE (APIC_DFR_CLUSTER)
 
-static inline const cpumask_t *target_cpus(void)
+static inline const cpumask_t *summit_target_cpus(void)
 {
        /* CPU_MASK_ALL (0xff) has undefined behaviour with
         * dest_LowestPrio mode logical clustered apic interrupt routing
index 06be776067ada89016d0d3e1f34c237888fd1eb2..d3cead2d2fc847d60e1f58a7aa696aa0c1ef9464 100644 (file)
@@ -68,7 +68,7 @@ struct genapic apic_bigsmp = {
        /* phys delivery to target CPU: */
        .irq_dest_mode                  = 0,
 
-       .target_cpus                    = target_cpus,
+       .target_cpus                    = bigsmp_target_cpus,
        .ESR_DISABLE                    = esr_disable,
        .apic_destination_logical       = APIC_DEST_LOGICAL,
        .check_apicid_used              = check_apicid_used,
index fe97b0114a0614358c52b6c4219a5aff468ef86e..a483e22273e5a5166eb9b55db58e81ef4786bc33 100644 (file)
@@ -35,7 +35,7 @@ struct genapic apic_default = {
        /* logical delivery broadcast to all CPUs: */
        .irq_dest_mode                  = 1,
 
-       .target_cpus                    = target_cpus,
+       .target_cpus                    = default_target_cpus,
        .ESR_DISABLE                    = esr_disable,
        .apic_destination_logical       = APIC_DEST_LOGICAL,
        .check_apicid_used              = check_apicid_used,
index 269a97aef431091e4b6ee4365a998f177aca6198..e31f0c35470dce4288c7c97128bc8c4fe53819a2 100644 (file)
@@ -111,7 +111,7 @@ struct genapic apic_es7000 = {
        /* phys delivery to target CPUs: */
        .irq_dest_mode                  = 0,
 
-       .target_cpus                    = target_cpus,
+       .target_cpus                    = es7000_target_cpus,
        .ESR_DISABLE                    = esr_disable,
        .apic_destination_logical       = APIC_DEST_LOGICAL,
        .check_apicid_used              = check_apicid_used,
index 6daddb6949d2b4cb33307d83258ac69e84486300..4b84b5970fbe0501cdf44236b2cc502f42efee08 100644 (file)
@@ -55,7 +55,7 @@ struct genapic apic_numaq = {
        /* physical delivery on LOCAL quad: */
        .irq_dest_mode                  = 0,
 
-       .target_cpus                    = target_cpus,
+       .target_cpus                    = numaq_target_cpus,
        .ESR_DISABLE                    = esr_disable,
        .apic_destination_logical       = APIC_DEST_LOGICAL,
        .check_apicid_used              = check_apicid_used,
index 1b9164b92b0a1cee358e249c84fd490390b00f2d..e6b956a08484f1345019b0a2f53dab40cea23440 100644 (file)
@@ -48,7 +48,7 @@ struct genapic apic_summit = {
        /* logical delivery broadcast to all CPUs: */
        .irq_dest_mode                  = 1,
 
-       .target_cpus                    = target_cpus,
+       .target_cpus                    = summit_target_cpus,
        .ESR_DISABLE                    = esr_disable,
        .apic_destination_logical       = APIC_DEST_LOGICAL,
        .check_apicid_used              = check_apicid_used,