diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-28 00:50:47 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-28 17:20:23 -0500 |
commit | 3f57a318c36e1f24070a18df8c4971ca08d33142 (patch) | |
tree | 60e1564286a7e3ed22142cef97b8039548030827 /arch | |
parent | 33a201fac698a93d9d1ffa77030ba2ff38d1a3d1 (diff) |
x86, apic: clean up ->apicid_to_node()
- separate the namespace
- remove macros
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/bigsmp/apic.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/es7000/apic.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/mach_apic.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-generic/mach_apic.h | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/numaq/apic.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/summit/apic.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/smpboot.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-generic/bigsmp.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-generic/default.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-generic/es7000.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-generic/numaq.c | 2 | ||||
-rw-r--r-- | arch/x86/mach-generic/summit.c | 2 |
12 files changed, 12 insertions, 13 deletions
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h index df59298086c6..77f0b7348755 100644 --- a/arch/x86/include/asm/bigsmp/apic.h +++ b/arch/x86/include/asm/bigsmp/apic.h | |||
@@ -62,7 +62,7 @@ static inline void bigsmp_setup_apic_routing(void) | |||
62 | "Physflat", nr_ioapics); | 62 | "Physflat", nr_ioapics); |
63 | } | 63 | } |
64 | 64 | ||
65 | static inline int apicid_to_node(int logical_apicid) | 65 | static inline int bigsmp_apicid_to_node(int logical_apicid) |
66 | { | 66 | { |
67 | return apicid_2_node[hard_smp_processor_id()]; | 67 | return apicid_2_node[hard_smp_processor_id()]; |
68 | } | 68 | } |
diff --git a/arch/x86/include/asm/es7000/apic.h b/arch/x86/include/asm/es7000/apic.h index 632e4cd3f4fd..bcdf31400dfa 100644 --- a/arch/x86/include/asm/es7000/apic.h +++ b/arch/x86/include/asm/es7000/apic.h | |||
@@ -82,7 +82,7 @@ static inline void es7000_setup_apic_routing(void) | |||
82 | nr_ioapics, cpus_addr(*es7000_target_cpus())[0]); | 82 | nr_ioapics, cpus_addr(*es7000_target_cpus())[0]); |
83 | } | 83 | } |
84 | 84 | ||
85 | static inline int apicid_to_node(int logical_apicid) | 85 | static inline int es7000_apicid_to_node(int logical_apicid) |
86 | { | 86 | { |
87 | return 0; | 87 | return 0; |
88 | } | 88 | } |
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h index f418d470cf45..2f78209d972c 100644 --- a/arch/x86/include/asm/mach-default/mach_apic.h +++ b/arch/x86/include/asm/mach-default/mach_apic.h | |||
@@ -78,7 +78,7 @@ static inline void default_setup_apic_routing(void) | |||
78 | #endif | 78 | #endif |
79 | } | 79 | } |
80 | 80 | ||
81 | static inline int apicid_to_node(int logical_apicid) | 81 | static inline int default_apicid_to_node(int logical_apicid) |
82 | { | 82 | { |
83 | #ifdef CONFIG_SMP | 83 | #ifdef CONFIG_SMP |
84 | return apicid_2_node[hard_smp_processor_id()]; | 84 | return apicid_2_node[hard_smp_processor_id()]; |
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h index bdea0a759e8a..b585a8e5f816 100644 --- a/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/arch/x86/include/asm/mach-generic/mach_apic.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #include <asm/genapic.h> | 4 | #include <asm/genapic.h> |
5 | 5 | ||
6 | #define apicid_to_node (apic->apicid_to_node) | ||
7 | #define cpu_to_logical_apicid (apic->cpu_to_logical_apicid) | 6 | #define cpu_to_logical_apicid (apic->cpu_to_logical_apicid) |
8 | #define cpu_present_to_apicid (apic->cpu_present_to_apicid) | 7 | #define cpu_present_to_apicid (apic->cpu_present_to_apicid) |
9 | #define apicid_to_cpu_present (apic->apicid_to_cpu_present) | 8 | #define apicid_to_cpu_present (apic->apicid_to_cpu_present) |
diff --git a/arch/x86/include/asm/numaq/apic.h b/arch/x86/include/asm/numaq/apic.h index 22bdf3d4c0e3..a0e3b437118c 100644 --- a/arch/x86/include/asm/numaq/apic.h +++ b/arch/x86/include/asm/numaq/apic.h | |||
@@ -76,14 +76,14 @@ static inline int cpu_present_to_apicid(int mps_cpu) | |||
76 | return BAD_APICID; | 76 | return BAD_APICID; |
77 | } | 77 | } |
78 | 78 | ||
79 | static inline int apicid_to_node(int logical_apicid) | 79 | static inline int numaq_apicid_to_node(int logical_apicid) |
80 | { | 80 | { |
81 | return logical_apicid >> 4; | 81 | return logical_apicid >> 4; |
82 | } | 82 | } |
83 | 83 | ||
84 | static inline physid_mask_t apicid_to_cpu_present(int logical_apicid) | 84 | static inline physid_mask_t apicid_to_cpu_present(int logical_apicid) |
85 | { | 85 | { |
86 | int node = apicid_to_node(logical_apicid); | 86 | int node = numaq_apicid_to_node(logical_apicid); |
87 | int cpu = __ffs(logical_apicid & 0xf); | 87 | int cpu = __ffs(logical_apicid & 0xf); |
88 | 88 | ||
89 | return physid_mask_of_physid(cpu + 4*node); | 89 | return physid_mask_of_physid(cpu + 4*node); |
diff --git a/arch/x86/include/asm/summit/apic.h b/arch/x86/include/asm/summit/apic.h index acb7bd1de848..cfff2760e60d 100644 --- a/arch/x86/include/asm/summit/apic.h +++ b/arch/x86/include/asm/summit/apic.h | |||
@@ -75,7 +75,7 @@ static inline void summit_setup_apic_routing(void) | |||
75 | nr_ioapics); | 75 | nr_ioapics); |
76 | } | 76 | } |
77 | 77 | ||
78 | static inline int apicid_to_node(int logical_apicid) | 78 | static inline int summit_apicid_to_node(int logical_apicid) |
79 | { | 79 | { |
80 | #ifdef CONFIG_SMP | 80 | #ifdef CONFIG_SMP |
81 | return apicid_2_node[hard_smp_processor_id()]; | 81 | return apicid_2_node[hard_smp_processor_id()]; |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 3791b4ae567f..1dd4cecd4bc0 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -163,7 +163,7 @@ static void map_cpu_to_logical_apicid(void) | |||
163 | { | 163 | { |
164 | int cpu = smp_processor_id(); | 164 | int cpu = smp_processor_id(); |
165 | int apicid = logical_smp_processor_id(); | 165 | int apicid = logical_smp_processor_id(); |
166 | int node = apicid_to_node(apicid); | 166 | int node = apic->apicid_to_node(apicid); |
167 | 167 | ||
168 | if (!node_online(node)) | 168 | if (!node_online(node)) |
169 | node = first_online_node; | 169 | node = first_online_node; |
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c index d0749569cdf7..2f4121499e5f 100644 --- a/arch/x86/mach-generic/bigsmp.c +++ b/arch/x86/mach-generic/bigsmp.c | |||
@@ -80,7 +80,7 @@ struct genapic apic_bigsmp = { | |||
80 | .ioapic_phys_id_map = bigsmp_ioapic_phys_id_map, | 80 | .ioapic_phys_id_map = bigsmp_ioapic_phys_id_map, |
81 | .setup_apic_routing = bigsmp_setup_apic_routing, | 81 | .setup_apic_routing = bigsmp_setup_apic_routing, |
82 | .multi_timer_check = NULL, | 82 | .multi_timer_check = NULL, |
83 | .apicid_to_node = apicid_to_node, | 83 | .apicid_to_node = bigsmp_apicid_to_node, |
84 | .cpu_to_logical_apicid = cpu_to_logical_apicid, | 84 | .cpu_to_logical_apicid = cpu_to_logical_apicid, |
85 | .cpu_present_to_apicid = cpu_present_to_apicid, | 85 | .cpu_present_to_apicid = cpu_present_to_apicid, |
86 | .apicid_to_cpu_present = apicid_to_cpu_present, | 86 | .apicid_to_cpu_present = apicid_to_cpu_present, |
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c index 6a21aa7c0c6d..d391c2dc819d 100644 --- a/arch/x86/mach-generic/default.c +++ b/arch/x86/mach-generic/default.c | |||
@@ -61,7 +61,7 @@ struct genapic apic_default = { | |||
61 | .ioapic_phys_id_map = default_ioapic_phys_id_map, | 61 | .ioapic_phys_id_map = default_ioapic_phys_id_map, |
62 | .setup_apic_routing = default_setup_apic_routing, | 62 | .setup_apic_routing = default_setup_apic_routing, |
63 | .multi_timer_check = NULL, | 63 | .multi_timer_check = NULL, |
64 | .apicid_to_node = apicid_to_node, | 64 | .apicid_to_node = default_apicid_to_node, |
65 | .cpu_to_logical_apicid = cpu_to_logical_apicid, | 65 | .cpu_to_logical_apicid = cpu_to_logical_apicid, |
66 | .cpu_present_to_apicid = cpu_present_to_apicid, | 66 | .cpu_present_to_apicid = cpu_present_to_apicid, |
67 | .apicid_to_cpu_present = apicid_to_cpu_present, | 67 | .apicid_to_cpu_present = apicid_to_cpu_present, |
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c index 0be59a51df2f..933f2a385990 100644 --- a/arch/x86/mach-generic/es7000.c +++ b/arch/x86/mach-generic/es7000.c | |||
@@ -122,7 +122,7 @@ struct genapic apic_es7000 = { | |||
122 | .ioapic_phys_id_map = es7000_ioapic_phys_id_map, | 122 | .ioapic_phys_id_map = es7000_ioapic_phys_id_map, |
123 | .setup_apic_routing = es7000_setup_apic_routing, | 123 | .setup_apic_routing = es7000_setup_apic_routing, |
124 | .multi_timer_check = NULL, | 124 | .multi_timer_check = NULL, |
125 | .apicid_to_node = apicid_to_node, | 125 | .apicid_to_node = es7000_apicid_to_node, |
126 | .cpu_to_logical_apicid = cpu_to_logical_apicid, | 126 | .cpu_to_logical_apicid = cpu_to_logical_apicid, |
127 | .cpu_present_to_apicid = cpu_present_to_apicid, | 127 | .cpu_present_to_apicid = cpu_present_to_apicid, |
128 | .apicid_to_cpu_present = apicid_to_cpu_present, | 128 | .apicid_to_cpu_present = apicid_to_cpu_present, |
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c index da4ed653506a..38344fb99793 100644 --- a/arch/x86/mach-generic/numaq.c +++ b/arch/x86/mach-generic/numaq.c | |||
@@ -67,7 +67,7 @@ struct genapic apic_numaq = { | |||
67 | .ioapic_phys_id_map = numaq_ioapic_phys_id_map, | 67 | .ioapic_phys_id_map = numaq_ioapic_phys_id_map, |
68 | .setup_apic_routing = numaq_setup_apic_routing, | 68 | .setup_apic_routing = numaq_setup_apic_routing, |
69 | .multi_timer_check = numaq_multi_timer_check, | 69 | .multi_timer_check = numaq_multi_timer_check, |
70 | .apicid_to_node = apicid_to_node, | 70 | .apicid_to_node = numaq_apicid_to_node, |
71 | .cpu_to_logical_apicid = cpu_to_logical_apicid, | 71 | .cpu_to_logical_apicid = cpu_to_logical_apicid, |
72 | .cpu_present_to_apicid = cpu_present_to_apicid, | 72 | .cpu_present_to_apicid = cpu_present_to_apicid, |
73 | .apicid_to_cpu_present = apicid_to_cpu_present, | 73 | .apicid_to_cpu_present = apicid_to_cpu_present, |
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c index b618a186f1e2..6150604deaa3 100644 --- a/arch/x86/mach-generic/summit.c +++ b/arch/x86/mach-generic/summit.c | |||
@@ -60,7 +60,7 @@ struct genapic apic_summit = { | |||
60 | .ioapic_phys_id_map = summit_ioapic_phys_id_map, | 60 | .ioapic_phys_id_map = summit_ioapic_phys_id_map, |
61 | .setup_apic_routing = summit_setup_apic_routing, | 61 | .setup_apic_routing = summit_setup_apic_routing, |
62 | .multi_timer_check = NULL, | 62 | .multi_timer_check = NULL, |
63 | .apicid_to_node = apicid_to_node, | 63 | .apicid_to_node = summit_apicid_to_node, |
64 | .cpu_to_logical_apicid = cpu_to_logical_apicid, | 64 | .cpu_to_logical_apicid = cpu_to_logical_apicid, |
65 | .cpu_present_to_apicid = cpu_present_to_apicid, | 65 | .cpu_present_to_apicid = cpu_present_to_apicid, |
66 | .apicid_to_cpu_present = apicid_to_cpu_present, | 66 | .apicid_to_cpu_present = apicid_to_cpu_present, |