Re: [PATCH 1/1] cpumask: Change cpumask_of_cpu to use cpumask_of_cpu_map

From: Mike Travis
Date: Thu Jul 24 2008 - 20:38:04 EST


Mike Travis wrote:
> Rusty Russell wrote:
>> On Thursday 24 July 2008 03:18:42 Mike Travis wrote:
>>> Note that the declaration of cpumask_of_cpu_map[] is initialized
>>> so that cpumask_of_cpu(0) is defined early. This assumes that
>>> cpu 0 is the boot cpu.
>> Hi Mike,
>>
>> Make this statically initialized please. That almost guarantees there'll
>> be no problems. It's a little tricky to do, but possible. Patch below
>> tested on 32 bit x86 only.
>
> I thought about it, but it didn't seem to be worth the effort. One problem
> though, the cpumask bits are such that the LSB of the last word is cpu 0.
> So your initializer sets it up in reverse order. I'll see if I can't
> figure out how to invert it (very tricky coding btw... ;-)

I thought since the cpumask_scnprintf prints out the bit map with the LSB
being cpu 0 that the bit layout was the same. Further examination reveals
I was wrong about that.

The updated patchset to follow shortly after a bit more testing...

Thanks,
Mike
--
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/