[PATCH] ppc32: fix powersave with interrupts disabled

STALE7897d

2 messages, 2 authors, 2005-01-25 · open the first message on its own page

[PATCH] ppc32: fix powersave with interrupts disabled

From: Kumar Gala <hidden>
Date: 2005-01-24 22:02:34

It looks like the problem has to do with entering the powersave routine 
with irqs disabled. Here is a patch that will only enter powersave if irqs 
are enabled.

Entering powersave on PPC while irqs are disabled causes a hang. Only 
enter powersave if irqs are disabled.

Signed-off-by: Brian Waite <redacted> 
Signed-off-by: Kumar Gala <redacted>

---
diff -Nru a/arch/ppc/kernel/idle.c b/arch/ppc/kernel/idle.c
--- a/arch/ppc/kernel/idle.c	2005-01-24 15:48:24 -06:00
+++ b/arch/ppc/kernel/idle.c	2005-01-24 15:48:24 -06:00
@@ -39,7 +39,7 @@
 	powersave = ppc_md.power_save;
 
 	if (!need_resched()) {
-		if (powersave != NULL)
+		if (powersave != NULL && !irqs_disabled())
 			powersave();
 		else {
 #ifdef CONFIG_SMP

Re: [PATCH] ppc32: fix powersave with interrupts disabled

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2005-01-25 02:38:42

On Mon, 2005-01-24 at 15:51 -0600, Kumar Gala wrote:
It looks like the problem has to do with entering the powersave routine 
with irqs disabled. Here is a patch that will only enter powersave if irqs 
are enabled.

Entering powersave on PPC while irqs are disabled causes a hang. Only 
enter powersave if irqs are disabled.
I have a different fix which is to re-enable them (basically to move the
local_irq_disable we do in #ifdef CONFIG_SMP above the whole block,
removing the #else case).

I'm waiting for Ingo's ack about what exact race he's trying to fix
though...

Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help