Fix idle with interrupts disabled (PPC)
PATCH 1/1 Fix idle with interrupts disabled (PPC)
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 Thomas Gleixner <[email protected]>
--- idle.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
---
arch/ppc/kernel/idle.c +5 -2
@@ -41,14 +41,17 @@if (!need_resched ()) {if (powersave !=NULL )powersave (); +else {#ifdef CONFIG_SMP - else {set_thread_flag (TIF_POLLING_NRFLAG ); +local_irq_enable ();while (!need_resched ())barrier ();clear_thread_flag (TIF_POLLING_NRFLAG ); +#else +local_irq_enable (); +#endif } -#endif }if (need_resched ())schedule ();