]> git.baikalelectronics.ru Git - kernel.git/commit
[POWERPC] Fix thinko in cpu_thread_mask_to_cores()
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 22 Feb 2008 03:26:43 +0000 (14:26 +1100)
committerPaul Mackerras <paulus@samba.org>
Tue, 26 Feb 2008 11:17:03 +0000 (22:17 +1100)
commite5d9f683f808929eb5f24aba2f7efa01c782ebef
tree2a96cba53e6308588aae2c167255f269aba8e8c7
parentd8a1c094afcc75c165a0a82d03873f9a594636b9
[POWERPC] Fix thinko in cpu_thread_mask_to_cores()

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@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
include/asm-powerpc/cputhreads.h