linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jimi Xenidis <jimix@pobox.com>
To: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Cc: Scott Wood <scottwood@freescale.com>, David Gibson <dwg@au1.ibm.com>
Subject: [PATCH] [PATCH v3] powerpc: Fix xmon for systems without MSR[RI]
Date: Thu, 29 Sep 2011 07:45:51 -0500	[thread overview]
Message-ID: <1317300351-23744-1-git-send-email-jimix@pobox.com> (raw)
In-Reply-To: <1316792446-10599-1-git-send-email-jimix@pobox.com>

From: David Gibson <dwg@au1.ibm.com>

Based on patch by David Gibson <dwg@au1.ibm.com>

xmon has a longstanding bug on systems which are SMP-capable but lack
the MSR[RI] bit.  In these cases, xmon invoked by IPI on secondary
CPUs will not properly keep quiet, but will print stuff, thereby
garbling the primary xmon's output.  This patch fixes it, by ignoring
the RI bit if the processor does not support it.

There's already a version of this for 4xx upstream, which we'll need
to extend to other RI-lacking CPUs at some point.  For now this adds
Book3e processors to the mix.

Signed-off-by: Jimi Xenidis <jimix@pobox.com>

---
Restricted it to Book3e
Fix typo, its supposed to be CONFIG_PPC_BOOK3E
---
 arch/powerpc/xmon/xmon.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 42541bb..e88e7f5 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -340,8 +340,8 @@ int cpus_are_in_xmon(void)
 
 static inline int unrecoverable_excp(struct pt_regs *regs)
 {
-#ifdef CONFIG_4xx
-	/* We have no MSR_RI bit on 4xx, so we simply return false */
+#if defined(CONFIG_4xx) || defined(CONFIG_PPC_BOOK3E)
+	/* We have no MSR_RI bit on 4xx or Book3e, so we simply return false */
 	return 0;
 #else
 	return ((regs->msr & MSR_RI) == 0);
-- 
1.7.0.4

  reply	other threads:[~2011-09-29 12:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-08 21:25 [PATCH] powerpc: Fix xmon for systems without MSR[RI] Jimi Xenidis
2011-08-30  6:11 ` Benjamin Herrenschmidt
2011-08-30 18:08   ` Scott Wood
2011-08-31 21:08     ` Jimi Xenidis
2011-09-23 15:40 ` [PATCH v2] " Jimi Xenidis
2011-09-29 12:45   ` Jimi Xenidis [this message]
     [not found] ` <1316790104-10067-1-git-send-email-jimix@pobox.com>
2011-09-23 16:32   ` Scott Wood
2011-09-23 17:54     ` Jimi Xenidis
2011-09-23 17:56       ` Scott Wood

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=1317300351-23744-1-git-send-email-jimix@pobox.com \
    --to=jimix@pobox.com \
    --cc=dwg@au1.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=scottwood@freescale.com \
    /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).