powerpc/pmac/smp: Properly NAP offlined CPU on G5
commit62cc67b9df273be18fcb09a071592dedf751c90a
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 21 Feb 2011 05:49:58 +0000 (21 16:49 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 1 Apr 2011 04:37:25 +0000 (1 15:37 +1100)
tree604363a8a8ea577b59c58e10ba7cf36a67ced624
parente872e41b79f61dbc22f85577613925a4a7de1c1a
powerpc/pmac/smp: Properly NAP offlined CPU on G5

The current code soft-disables, and then goes to NAP mode which
turns interrupts on. That means that if an interrupt occurs, we
will hit the masked interrupt code path which isn't what we want,
as it will return with EE off, which will either get us out of
NAP mode, or fail to enter it (according to spec).

Instead, let's just rely on the fact that it is safe to take
decrementer interrupts on an offline CPU and leave interrupts
enabled. We can also get rid of the special case in asm for
power4_cpu_offline_powersave() and just use power4_idle().

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/machdep.h
arch/powerpc/kernel/head_64.S
arch/powerpc/kernel/idle_power4.S
arch/powerpc/platforms/powermac/smp.c