powerpc: Use cpu_thread_in_core in smp_init for of_spin_map
authorMilton Miller <miltonm@bga.com>
Mon, 20 Oct 2008 15:37:03 +0000 (15:37 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 13 Dec 2008 23:29:35 +0000 (15:29 -0800)
commitec9ea180923639380683ebb52d135bc01959f2b1
tree1acc7f9d0044b46b08f6883639b659a41d2b46be
parentc53129f96b5f2d7fa3979d39a9b641bafec430b9
powerpc: Use cpu_thread_in_core in smp_init for of_spin_map

commit 6a75a6b8e85e92cc774d42a4e113c76c30b5a539 upstream.

We used to assume that even numbered threads were the primary
threads, ie those that would be listed and started as a cpu from
open firmware.  Replace a left over is even (% 2) check with a check
for it being a primary thread and update the comments.

Tested with a debug print on pseries, identical code found for cell.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/powerpc/platforms/cell/smp.c
arch/powerpc/platforms/pseries/smp.c