aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-11-22 18:46:38 -0500
committerPaul Mackerras <paulus@samba.org>2006-12-04 04:40:21 -0500
commit5850dd8f6d4e79484d498c0d77b223d1041f9954 (patch)
tree6fd2e813d5fb44b0fe028b8f80c7cbab02cbcc9e /arch/powerpc/platforms
parentbf1ab978be2318c5a564de9aa0f1a217b44170d4 (diff)
[POWERPC] cell: hard disable interrupts in power_save()
With soft-disabled interrupts in power_save, we can still get external exceptions on Cell, even if we are in pause(0) a.k.a. sleep state. When the CPU really wakes up through the 0x100 (system reset) vector, while we have already started processing the 0x500 (external) exception, we get a panic in unrecoverable_exception() because of the lost state. This occurred in Systemsim for Cell, but as far as I can see, it can theoretically occur on any machine that uses the system reset exception to get out of sleep state. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/cell/pervasive.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/pervasive.c b/arch/powerpc/platforms/cell/pervasive.c
index c68fabdc7874..8c20f0fb8651 100644
--- a/arch/powerpc/platforms/cell/pervasive.c
+++ b/arch/powerpc/platforms/cell/pervasive.c
@@ -41,6 +41,15 @@
41static void cbe_power_save(void) 41static void cbe_power_save(void)
42{ 42{
43 unsigned long ctrl, thread_switch_control; 43 unsigned long ctrl, thread_switch_control;
44
45 /*
46 * We need to hard disable interrupts, but we also need to mark them
47 * hard disabled in the PACA so that the local_irq_enable() done by
48 * our caller upon return propertly hard enables.
49 */
50 hard_irq_disable();
51 get_paca()->hard_enabled = 0;
52
44 ctrl = mfspr(SPRN_CTRLF); 53 ctrl = mfspr(SPRN_CTRLF);
45 54
46 /* Enable DEC and EE interrupt request */ 55 /* Enable DEC and EE interrupt request */