diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-17 09:09:08 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-17 11:52:47 -0500 |
commit | b9e0d1aa9767707cad24db32d8ce0409df16d491 (patch) | |
tree | 89d79bf32b5593b8140443d99ddab8d167486161 /arch/x86/kernel/summit_32.c | |
parent | 2c4ce18c95d632c9227ebcc6d45da11a9ef1ec70 (diff) |
x86, apic: remove apicid_cluster()
There were multiple definitions of apicid_cluster() scattered around
in APIC drivers - but the definitions are equivalent to the already
existing generic APIC_CLUSTER() method.
So remove apicid_cluster() and change all users to APIC_CLUSTER().
No code changed:
md5:
1b8244ba8d3d6a454593ce10f09dfa58 summit_32.o.before.asm
1b8244ba8d3d6a454593ce10f09dfa58 summit_32.o.after.asm
md5:
a593d98a882bf534622c70d9568497ac es7000_32.o.before.asm
a593d98a882bf534622c70d9568497ac es7000_32.o.after.asm
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/summit_32.c')
-rw-r--r-- | arch/x86/kernel/summit_32.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/summit_32.c index 7a1db1f23563..c4690349a54a 100644 --- a/arch/x86/kernel/summit_32.c +++ b/arch/x86/kernel/summit_32.c | |||
@@ -207,14 +207,12 @@ static inline unsigned long summit_check_apicid_present(int bit) | |||
207 | return 1; | 207 | return 1; |
208 | } | 208 | } |
209 | 209 | ||
210 | #define apicid_cluster(apicid) ((apicid) & XAPIC_DEST_CLUSTER_MASK) | ||
211 | |||
212 | static inline void summit_init_apic_ldr(void) | 210 | static inline void summit_init_apic_ldr(void) |
213 | { | 211 | { |
214 | unsigned long val, id; | 212 | unsigned long val, id; |
215 | int count = 0; | 213 | int count = 0; |
216 | u8 my_id = (u8)hard_smp_processor_id(); | 214 | u8 my_id = (u8)hard_smp_processor_id(); |
217 | u8 my_cluster = (u8)apicid_cluster(my_id); | 215 | u8 my_cluster = APIC_CLUSTER(my_id); |
218 | #ifdef CONFIG_SMP | 216 | #ifdef CONFIG_SMP |
219 | u8 lid; | 217 | u8 lid; |
220 | int i; | 218 | int i; |
@@ -222,7 +220,7 @@ static inline void summit_init_apic_ldr(void) | |||
222 | /* Create logical APIC IDs by counting CPUs already in cluster. */ | 220 | /* Create logical APIC IDs by counting CPUs already in cluster. */ |
223 | for (count = 0, i = nr_cpu_ids; --i >= 0; ) { | 221 | for (count = 0, i = nr_cpu_ids; --i >= 0; ) { |
224 | lid = cpu_2_logical_apicid[i]; | 222 | lid = cpu_2_logical_apicid[i]; |
225 | if (lid != BAD_APICID && apicid_cluster(lid) == my_cluster) | 223 | if (lid != BAD_APICID && APIC_CLUSTER(lid) == my_cluster) |
226 | ++count; | 224 | ++count; |
227 | } | 225 | } |
228 | #endif | 226 | #endif |
@@ -319,8 +317,7 @@ static inline unsigned int summit_cpu_mask_to_apicid(const cpumask_t *cpumask) | |||
319 | if (cpu_isset(cpu, *cpumask)) { | 317 | if (cpu_isset(cpu, *cpumask)) { |
320 | int new_apicid = summit_cpu_to_logical_apicid(cpu); | 318 | int new_apicid = summit_cpu_to_logical_apicid(cpu); |
321 | 319 | ||
322 | if (apicid_cluster(apicid) != | 320 | if (APIC_CLUSTER(apicid) != APIC_CLUSTER(new_apicid)) { |
323 | apicid_cluster(new_apicid)) { | ||
324 | printk ("%s: Not a valid mask!\n", __func__); | 321 | printk ("%s: Not a valid mask!\n", __func__); |
325 | 322 | ||
326 | return 0xFF; | 323 | return 0xFF; |