DORMANTno replies

[PATCH 2.6.10-mm2] Fix idle with interrupts disabled (PPC)

From: <hidden>
Date: 2005-01-09 12:31:26

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 <redacted>

---
 idle.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
Index: 2.6.10-mm2/arch/ppc/kernel/idle.c
===================================================================
--- 2.6.10-mm2/arch/ppc/kernel/idle.c	(revision 141)
+++ 2.6.10-mm2/arch/ppc/kernel/idle.c	(working copy)
@@ -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();
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help