[PATCH] [POWERPC] Fix thinko in cpu_thread_mask_to_cores()

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Feb 22 14:42:36 EST 2008


On Fri, 2008-02-22 at 14:26 +1100, Benjamin Herrenschmidt wrote:
> The function cpu_thread_mask_to_cores() which returns a cpumask
> of one and only one thread enabled for a given core has a bug
> as it's shifting things in the wrong direction.
> 
> Note: The implementation is still sub-optimal in the sense that
> for a given core, the thread set in the result may not be any of
> the threads set in the input, which can lead to more IPIs then
> strictly necessary, but it isn't incorrect per-se. I'll improve
> that later.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> ---

Note that this function is, afaik, not used by anything in-tree at the 
moment, so the bug isn't hurting anybody, but I'd rather have it
fixed anyway.

Ben.




More information about the Linuxppc-dev mailing list