aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-17 09:09:08 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-17 11:52:47 -0500
commitb9e0d1aa9767707cad24db32d8ce0409df16d491 (patch)
tree89d79bf32b5593b8140443d99ddab8d167486161 /arch/x86/kernel
parent2c4ce18c95d632c9227ebcc6d45da11a9ef1ec70 (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')
-rw-r--r--arch/x86/kernel/es7000_32.c8
-rw-r--r--arch/x86/kernel/numaq_32.c2
-rw-r--r--arch/x86/kernel/summit_32.c9
3 files changed, 5 insertions, 14 deletions
diff --git a/arch/x86/kernel/es7000_32.c b/arch/x86/kernel/es7000_32.c
index c7cc9776ccae..8a20866b2a39 100644
--- a/arch/x86/kernel/es7000_32.c
+++ b/arch/x86/kernel/es7000_32.c
@@ -146,8 +146,6 @@ extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
146extern void unmap_unisys_acpi_oem_table(unsigned long oem_addr); 146extern void unmap_unisys_acpi_oem_table(unsigned long oem_addr);
147extern void setup_unisys(void); 147extern void setup_unisys(void);
148 148
149#define apicid_cluster(apicid) (apicid & 0xF0)
150
151/* 149/*
152 * ES7000 Globals 150 * ES7000 Globals
153 */ 151 */
@@ -595,8 +593,7 @@ es7000_cpu_mask_to_apicid_cluster(const struct cpumask *cpumask)
595 if (cpumask_test_cpu(cpu, cpumask)) { 593 if (cpumask_test_cpu(cpu, cpumask)) {
596 int new_apicid = es7000_cpu_to_logical_apicid(cpu); 594 int new_apicid = es7000_cpu_to_logical_apicid(cpu);
597 595
598 if (apicid_cluster(apicid) != 596 if (APIC_CLUSTER(apicid) != APIC_CLUSTER(new_apicid)) {
599 apicid_cluster(new_apicid)) {
600 printk ("%s: Not a valid mask!\n", __func__); 597 printk ("%s: Not a valid mask!\n", __func__);
601 598
602 return 0xFF; 599 return 0xFF;
@@ -630,8 +627,7 @@ static unsigned int es7000_cpu_mask_to_apicid(const cpumask_t *cpumask)
630 if (cpu_isset(cpu, *cpumask)) { 627 if (cpu_isset(cpu, *cpumask)) {
631 int new_apicid = es7000_cpu_to_logical_apicid(cpu); 628 int new_apicid = es7000_cpu_to_logical_apicid(cpu);
632 629
633 if (apicid_cluster(apicid) != 630 if (APIC_CLUSTER(apicid) != APIC_CLUSTER(new_apicid)) {
634 apicid_cluster(new_apicid)) {
635 printk ("%s: Not a valid mask!\n", __func__); 631 printk ("%s: Not a valid mask!\n", __func__);
636 632
637 return es7000_cpu_to_logical_apicid(0); 633 return es7000_cpu_to_logical_apicid(0);
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c
index 9abaacde72eb..15328500de6e 100644
--- a/arch/x86/kernel/numaq_32.c
+++ b/arch/x86/kernel/numaq_32.c
@@ -375,8 +375,6 @@ static inline unsigned long numaq_check_apicid_present(int bit)
375 return physid_isset(bit, phys_cpu_present_map); 375 return physid_isset(bit, phys_cpu_present_map);
376} 376}
377 377
378#define apicid_cluster(apicid) (apicid & 0xF0)
379
380static inline int numaq_apic_id_registered(void) 378static inline int numaq_apic_id_registered(void)
381{ 379{
382 return 1; 380 return 1;
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
212static inline void summit_init_apic_ldr(void) 210static 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;