From: Tiejun Chen <tiejun.chen@windriver.com>
To: <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
jason.wessel@windriver.com
Subject: [v2][PATCH 2/3] powerpc: Bail out of KGDB when we've been triggered
Date: Thu, 23 Aug 2012 10:10:19 +0800 [thread overview]
Message-ID: <1345687820-5248-2-git-send-email-tiejun.chen@windriver.com> (raw)
In-Reply-To: <1345687820-5248-1-git-send-email-tiejun.chen@windriver.com>
We need to skip a breakpoint exception when it occurs after
a breakpoint has already been removed.
Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
---
v2: simply kgdb_skipexception() return path.
arch/powerpc/kernel/kgdb.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
index bbabc5a..05adb69 100644
--- a/arch/powerpc/kernel/kgdb.c
+++ b/arch/powerpc/kernel/kgdb.c
@@ -101,6 +101,21 @@ static int computeSignal(unsigned int tt)
return SIGHUP; /* default for things we don't know about */
}
+/**
+ *
+ * kgdb_skipexception - Bail out of KGDB when we've been triggered.
+ * @exception: Exception vector number
+ * @regs: Current &struct pt_regs.
+ *
+ * On some architectures we need to skip a breakpoint exception when
+ * it occurs after a breakpoint has been removed.
+ *
+ */
+int kgdb_skipexception(int exception, struct pt_regs *regs)
+{
+ return kgdb_isremovedbreak(regs->nip);
+}
+
static int kgdb_call_nmi_hook(struct pt_regs *regs)
{
kgdb_nmicallback(raw_smp_processor_id(), regs);
--
1.5.6
next prev parent reply other threads:[~2012-08-23 2:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-23 2:10 [v2][PATCH 1/3] kgdb,ppc: do not set kgdb_single_step on ppc Tiejun Chen
2012-08-23 2:10 ` Tiejun Chen [this message]
2012-08-23 2:10 ` [v2][PATCH 3/3] powerpc/kgdb: restore current_thread_info properly Tiejun Chen
2012-08-23 3:14 ` Nicholas A. Bellinger
2012-08-23 3:24 ` tiejun.chen
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=1345687820-5248-2-git-send-email-tiejun.chen@windriver.com \
--to=tiejun.chen@windriver.com \
--cc=benh@kernel.crashing.org \
--cc=jason.wessel@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.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).