* [PATCH] ppc32: fix powersave with interrupts disabled
@ 2005-01-24 21:51 Kumar Gala
2005-01-25 2:31 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 2+ messages in thread
From: Kumar Gala @ 2005-01-24 21:51 UTC (permalink / raw)
To: akpm; +Cc: waite, linuxppc-dev, linux-kernel
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 <waite@skycomputers.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ppc32: fix powersave with interrupts disabled
2005-01-24 21:51 [PATCH] ppc32: fix powersave with interrupts disabled Kumar Gala
@ 2005-01-25 2:31 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2005-01-25 2:31 UTC (permalink / raw)
To: Kumar Gala; +Cc: Andrew Morton, waite, Linux Kernel list, linuxppc-dev list
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-01-25 2:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-24 21:51 [PATCH] ppc32: fix powersave with interrupts disabled Kumar Gala
2005-01-25 2:31 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).