Re: [PATCH v2 1/2] x86_32: summit_32, use BAD_APICID

From: Jiri Slaby
Date: Wed Feb 25 2009 - 06:00:49 EST


On 24.2.2009 21:41, Jiri Slaby wrote:
--- 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)
int cpu;

num_bits_set = cpus_weight(*cpumask);
- /* Return id to all */
if (num_bits_set>= nr_cpu_ids)
- return 0xFF;
+ return BAD_APICID;

Actually, wasn't this intended to return all available rather than BAD (to which would correspond the comment), but performed in a wrong manner? This is old code, any ideas who would know this?

In my opinion the check should be removed completely to allow the code go through same-cluster check.

In that case, the callers code is buggy, since it passes online_cpu masks even on machines, where apics are not on the same clusters.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/