linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: tglx@linutronix.de
To: trini@kernel.crashing.org
Cc: akpm@osdl.org, mingo@elte.hu, linuxppc-embedded@ozlabs.org
Subject: [PATCH 2.6.10-mm2] Fix idle with interrupts disabled (PPC)
Date: Sun, 9 Jan 2005 13:22:11 +0100	[thread overview]
Message-ID: <20050109132202.1.patchmail@tglx> (raw)

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 <tglx@linutronix.de>

---
 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();

                 reply	other threads:[~2005-01-09 12:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050109132202.1.patchmail@tglx \
    --to=tglx@linutronix.de \
    --cc=akpm@osdl.org \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=mingo@elte.hu \
    --cc=trini@kernel.crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).