x86, apic: clean up ->apicid_to_node()
authorIngo Molnar <mingo@elte.hu>
Wed, 28 Jan 2009 05:50:47 +0000 (06:50 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 28 Jan 2009 22:20:23 +0000 (23:20 +0100)
- separate the namespace

 - remove macros

Signed-off-by: Ingo Molnar <mingo@elte.hu>
12 files changed:
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/mach-generic/mach_apic.h
arch/x86/include/asm/numaq/apic.h
arch/x86/include/asm/summit/apic.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 df59298086c6743ee0064751655ede55b2a6e010..77f0b73487551c1e1058a8003c5b751998038870 100644 (file)
@@ -62,7 +62,7 @@ static inline void bigsmp_setup_apic_routing(void)
                "Physflat", nr_ioapics);
 }
 
-static inline int apicid_to_node(int logical_apicid)
+static inline int bigsmp_apicid_to_node(int logical_apicid)
 {
        return apicid_2_node[hard_smp_processor_id()];
 }
index 632e4cd3f4fd7a9d517a3c3706ed9785b8c7d939..bcdf31400dfa3b06c08e347ff4023117c16fd900 100644 (file)
@@ -82,7 +82,7 @@ static inline void es7000_setup_apic_routing(void)
                        nr_ioapics, cpus_addr(*es7000_target_cpus())[0]);
 }
 
-static inline int apicid_to_node(int logical_apicid)
+static inline int es7000_apicid_to_node(int logical_apicid)
 {
        return 0;
 }
index f418d470cf45a906d17778ad0a0b4c008fbd3212..2f78209d972cb6dcbafeb96f8273b3bbe914a08e 100644 (file)
@@ -78,7 +78,7 @@ static inline void default_setup_apic_routing(void)
 #endif
 }
 
-static inline int apicid_to_node(int logical_apicid)
+static inline int default_apicid_to_node(int logical_apicid)
 {
 #ifdef CONFIG_SMP
        return apicid_2_node[hard_smp_processor_id()];
index bdea0a759e8aea91432564d00615dcd3aa06aaa7..b585a8e5f816e9d593502308217aa802a35f9703 100644 (file)
@@ -3,7 +3,6 @@
 
 #include <asm/genapic.h>
 
-#define apicid_to_node (apic->apicid_to_node)
 #define cpu_to_logical_apicid (apic->cpu_to_logical_apicid) 
 #define cpu_present_to_apicid (apic->cpu_present_to_apicid)
 #define apicid_to_cpu_present (apic->apicid_to_cpu_present)
index 22bdf3d4c0e3730dd2fcfebe306352e806d1947c..a0e3b437118c87469629ec208adfce4bc1425669 100644 (file)
@@ -76,14 +76,14 @@ static inline int cpu_present_to_apicid(int mps_cpu)
                return BAD_APICID;
 }
 
-static inline int apicid_to_node(int logical_apicid) 
+static inline int numaq_apicid_to_node(int logical_apicid) 
 {
        return logical_apicid >> 4;
 }
 
 static inline physid_mask_t apicid_to_cpu_present(int logical_apicid)
 {
-       int node = apicid_to_node(logical_apicid);
+       int node = numaq_apicid_to_node(logical_apicid);
        int cpu = __ffs(logical_apicid & 0xf);
 
        return physid_mask_of_physid(cpu + 4*node);
index acb7bd1de8481f5c96a15e21a6b70626176e6161..cfff2760e60dd08ccb38b921cdde8c3d333503a4 100644 (file)
@@ -75,7 +75,7 @@ static inline void summit_setup_apic_routing(void)
                                                nr_ioapics);
 }
 
-static inline int apicid_to_node(int logical_apicid)
+static inline int summit_apicid_to_node(int logical_apicid)
 {
 #ifdef CONFIG_SMP
        return apicid_2_node[hard_smp_processor_id()];
index 3791b4ae567fb0a481268a1beed9c34effe8f488..1dd4cecd4bc062334fe42d0a7f3371911aa218a0 100644 (file)
@@ -163,7 +163,7 @@ static void map_cpu_to_logical_apicid(void)
 {
        int cpu = smp_processor_id();
        int apicid = logical_smp_processor_id();
-       int node = apicid_to_node(apicid);
+       int node = apic->apicid_to_node(apicid);
 
        if (!node_online(node))
                node = first_online_node;
index d0749569cdf78cb70d56a7a560f20297bb01129c..2f4121499e5fea0d75447775f87b22a70ce649a4 100644 (file)
@@ -80,7 +80,7 @@ struct genapic apic_bigsmp = {
        .ioapic_phys_id_map             = bigsmp_ioapic_phys_id_map,
        .setup_apic_routing             = bigsmp_setup_apic_routing,
        .multi_timer_check              = NULL,
-       .apicid_to_node                 = apicid_to_node,
+       .apicid_to_node                 = bigsmp_apicid_to_node,
        .cpu_to_logical_apicid          = cpu_to_logical_apicid,
        .cpu_present_to_apicid          = cpu_present_to_apicid,
        .apicid_to_cpu_present          = apicid_to_cpu_present,
index 6a21aa7c0c6dc6b0d9bac8deca72db999d5722d5..d391c2dc819da14cf228820feb405cbec9b34dfd 100644 (file)
@@ -61,7 +61,7 @@ struct genapic apic_default = {
        .ioapic_phys_id_map             = default_ioapic_phys_id_map,
        .setup_apic_routing             = default_setup_apic_routing,
        .multi_timer_check              = NULL,
-       .apicid_to_node                 = apicid_to_node,
+       .apicid_to_node                 = default_apicid_to_node,
        .cpu_to_logical_apicid          = cpu_to_logical_apicid,
        .cpu_present_to_apicid          = cpu_present_to_apicid,
        .apicid_to_cpu_present          = apicid_to_cpu_present,
index 0be59a51df2fe1a62e5f7a624b4a749d52224ee6..933f2a385990b2d653c75355c8947103624ee4d6 100644 (file)
@@ -122,7 +122,7 @@ struct genapic apic_es7000 = {
        .ioapic_phys_id_map             = es7000_ioapic_phys_id_map,
        .setup_apic_routing             = es7000_setup_apic_routing,
        .multi_timer_check              = NULL,
-       .apicid_to_node                 = apicid_to_node,
+       .apicid_to_node                 = es7000_apicid_to_node,
        .cpu_to_logical_apicid          = cpu_to_logical_apicid,
        .cpu_present_to_apicid          = cpu_present_to_apicid,
        .apicid_to_cpu_present          = apicid_to_cpu_present,
index da4ed653506a3dd9f303b9bcfd0484988ea1e7bd..38344fb997939ba6fb10026fe679ee570fa0671d 100644 (file)
@@ -67,7 +67,7 @@ struct genapic apic_numaq = {
        .ioapic_phys_id_map             = numaq_ioapic_phys_id_map,
        .setup_apic_routing             = numaq_setup_apic_routing,
        .multi_timer_check              = numaq_multi_timer_check,
-       .apicid_to_node                 = apicid_to_node,
+       .apicid_to_node                 = numaq_apicid_to_node,
        .cpu_to_logical_apicid          = cpu_to_logical_apicid,
        .cpu_present_to_apicid          = cpu_present_to_apicid,
        .apicid_to_cpu_present          = apicid_to_cpu_present,
index b618a186f1e2de47e1e52a38813f7d9650f42d54..6150604deaa3f1c33b3d5f828ec4ab6120a78dce 100644 (file)
@@ -60,7 +60,7 @@ struct genapic apic_summit = {
        .ioapic_phys_id_map             = summit_ioapic_phys_id_map,
        .setup_apic_routing             = summit_setup_apic_routing,
        .multi_timer_check              = NULL,
-       .apicid_to_node                 = apicid_to_node,
+       .apicid_to_node                 = summit_apicid_to_node,
        .cpu_to_logical_apicid          = cpu_to_logical_apicid,
        .cpu_present_to_apicid          = cpu_present_to_apicid,
        .apicid_to_cpu_present          = apicid_to_cpu_present,