Commit e63fe401 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Linus Torvalds

[PATCH] ppc: fix idle with interrupts disabled

The idle-thread-preemption-fix.patch in mm1/2 leads to a stalled box on PPC
machines which do not provide a powersave function and therefor poll the
idle loop with interrupts disabled.  The patch reenables interrupts.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 09c2e123
......@@ -41,14 +41,17 @@ void default_idle(void)
if (!need_resched()) {
if (powersave != NULL)
powersave();
#ifdef CONFIG_SMP
else {
#ifdef CONFIG_SMP
set_thread_flag(TIF_POLLING_NRFLAG);
local_irq_enable();
while (!need_resched())
barrier();
clear_thread_flag(TIF_POLLING_NRFLAG);
}
#else
local_irq_enable();
#endif
}
}
if (need_resched())
schedule();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment