aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2009-02-24 15:41:32 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-24 16:07:51 -0500
commit10b614eaa847447c2c8646030728309d14bd2d05 (patch)
tree58c165f00eda130477becd16c756b43829f4b71b /arch/x86/kernel/apic
parentecda06289f8202d4c6beb235f59ea464f4a91209 (diff)
x86_32: summit_32, use BAD_APICID
Use BAD_APICID instead of 0xFF constants in summit_cpu_mask_to_apicid. Also remove bogus comments about what we actually return. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/apic')
-rw-r--r--arch/x86/kernel/apic/summit_32.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/x86/kernel/apic/summit_32.c b/arch/x86/kernel/apic/summit_32.c
index cfe7b09015d8..d02f4385707c 100644
--- a/arch/x86/kernel/apic/summit_32.c
+++ b/arch/x86/kernel/apic/summit_32.c
@@ -303,12 +303,10 @@ static inline unsigned int summit_cpu_mask_to_apicid(const cpumask_t *cpumask)
303 int cpu; 303 int cpu;
304 304
305 num_bits_set = cpus_weight(*cpumask); 305 num_bits_set = cpus_weight(*cpumask);
306 /* Return id to all */
307 if (num_bits_set >= nr_cpu_ids) 306 if (num_bits_set >= nr_cpu_ids)
308 return 0xFF; 307 return BAD_APICID;
309 /* 308 /*
310 * The cpus in the mask must all be on the apic cluster. If are not 309 * The cpus in the mask must all be on the apic cluster.
311 * on the same apicid cluster return default value of target_cpus():
312 */ 310 */
313 cpu = first_cpu(*cpumask); 311 cpu = first_cpu(*cpumask);
314 apicid = summit_cpu_to_logical_apicid(cpu); 312 apicid = summit_cpu_to_logical_apicid(cpu);
@@ -318,9 +316,9 @@ static inline unsigned int summit_cpu_mask_to_apicid(const cpumask_t *cpumask)
318 int new_apicid = summit_cpu_to_logical_apicid(cpu); 316 int new_apicid = summit_cpu_to_logical_apicid(cpu);
319 317
320 if (APIC_CLUSTER(apicid) != APIC_CLUSTER(new_apicid)) { 318 if (APIC_CLUSTER(apicid) != APIC_CLUSTER(new_apicid)) {
321 printk ("%s: Not a valid mask!\n", __func__); 319 printk("%s: Not a valid mask!\n", __func__);
322 320
323 return 0xFF; 321 return BAD_APICID;
324 } 322 }
325 apicid = apicid | new_apicid; 323 apicid = apicid | new_apicid;
326 cpus_found++; 324 cpus_found++;