Skip to contentSkip to conversation

Fix idle with interrupts disabled (PPC)

PATCH New [email protected] 1 participant 1 message Jan 9, 2005

lore
Share & tools
lore
#0 lore raw

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.

---
 idle.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

---

arch/ppc/kernel/idle.c +5 -2
Index: 2.6.10-mm2/arch/ppc/kernel/idle.c
===================================================================
@@ -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();