From: Mike Travis <travis@sgi.com>
To: Ingo Molnar <mingo@redhat.com>,
Jason Wessel <jason.wessel@windriver.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
"H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Hedi Berriche <hedi@sgi.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] PATCH: KGDB/KDB Fix no KDB config problem.
Date: Fri, 18 Oct 2013 13:53:35 -0500 [thread overview]
Message-ID: <20131018185334.493487430@asylum.americas.sgi.com> (raw)
In-Reply-To: 20131018185334.272062791@asylum.americas.sgi.com
[-- Attachment #1: fix-no-kdb-error.patch --]
[-- Type: text/plain, Size: 2699 bytes --]
Some code added to the debug_core module had KDB dependencies that it
shouldn't have. Move the KDB dependent REASON back to the caller to
remove the dependence in KGDB code.
Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Hedi Berriche <hedi@sgi.com>
---
arch/x86/platform/uv/uv_nmi.c | 2 +-
include/linux/kgdb.h | 3 ++-
kernel/debug/debug_core.c | 5 +++--
kernel/debug/debug_core.h | 2 --
4 files changed, 6 insertions(+), 6 deletions(-)
--- linux.orig/arch/x86/platform/uv/uv_nmi.c
+++ linux/arch/x86/platform/uv/uv_nmi.c
@@ -553,7 +553,7 @@ static void uv_call_kdb(int cpu, struct
if (master) {
/* call KGDB NMI handler as MASTER */
ret = kgdb_nmicallin(cpu, X86_TRAP_NMI, regs,
- &uv_nmi_slave_continue);
+ KDB_REASON_SYSTEM_NMI, &uv_nmi_slave_continue);
if (ret) {
pr_alert("KDB returned error, is kgdboc set?\n");
atomic_set(&uv_nmi_slave_continue, SLAVE_EXIT);
--- linux.orig/include/linux/kgdb.h
+++ linux/include/linux/kgdb.h
@@ -310,7 +310,8 @@ extern int
kgdb_handle_exception(int ex_vector, int signo, int err_code,
struct pt_regs *regs);
extern int kgdb_nmicallback(int cpu, void *regs);
-extern int kgdb_nmicallin(int cpu, int trapnr, void *regs, atomic_t *snd_rdy);
+extern int kgdb_nmicallin(int cpu, int trapnr, void *regs, int err_code,
+ atomic_t *snd_rdy);
extern void gdbstub_exit(int status);
extern int kgdb_single_step;
--- linux.orig/kernel/debug/debug_core.c
+++ linux/kernel/debug/debug_core.c
@@ -736,7 +736,8 @@ int kgdb_nmicallback(int cpu, void *regs
return 1;
}
-int kgdb_nmicallin(int cpu, int trapnr, void *regs, atomic_t *send_ready)
+int kgdb_nmicallin(int cpu, int trapnr, void *regs, int err_code,
+ atomic_t *send_ready)
{
#ifdef CONFIG_SMP
if (!kgdb_io_ready(0) || !send_ready)
@@ -750,7 +751,7 @@ int kgdb_nmicallin(int cpu, int trapnr,
ks->cpu = cpu;
ks->ex_vector = trapnr;
ks->signo = SIGTRAP;
- ks->err_code = KGDB_KDB_REASON_SYSTEM_NMI;
+ ks->err_code = err_code;
ks->linux_regs = regs;
ks->send_ready = send_ready;
kgdb_cpu_enter(ks, regs, DCPU_WANT_MASTER);
--- linux.orig/kernel/debug/debug_core.h
+++ linux/kernel/debug/debug_core.h
@@ -75,13 +75,11 @@ extern int kdb_stub(struct kgdb_state *k
extern int kdb_parse(const char *cmdstr);
extern int kdb_common_init_state(struct kgdb_state *ks);
extern int kdb_common_deinit_state(void);
-#define KGDB_KDB_REASON_SYSTEM_NMI KDB_REASON_SYSTEM_NMI
#else /* ! CONFIG_KGDB_KDB */
static inline int kdb_stub(struct kgdb_state *ks)
{
return DBG_PASS_EVENT;
}
-#define KGDB_KDB_REASON_SYSTEM_NMI 0
#endif /* CONFIG_KGDB_KDB */
#endif /* _DEBUG_CORE_H_ */
--
next prev parent reply other threads:[~2013-10-18 18:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-18 18:53 [PATCH 0/3] : KGDB/KDB/UV updates Mike Travis
2013-10-18 18:53 ` Mike Travis [this message]
2013-10-18 18:53 ` [PATCH 2/3] PATCH: UV/NMI Fix tip/bot/kbuild test robot problems Mike Travis
2013-10-18 18:53 ` [PATCH 3/3] PATCH: UV/NMI/KGDB/KDB Fix UV NMI handler when KDB not configed Mike Travis
2013-10-19 8:56 ` [PATCH 0/3] : KGDB/KDB/UV updates Ingo Molnar
2014-01-13 18:12 ` Mike Travis
2014-01-13 19:02 ` Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2014-01-14 4:24 Mike Travis
2014-01-14 4:24 ` [PATCH 1/3] PATCH: KGDB/KDB Fix no KDB config problem Mike Travis
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=20131018185334.493487430@asylum.americas.sgi.com \
--to=travis@sgi.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=akpm@linux-foundation.org \
--cc=hedi@sgi.com \
--cc=hpa@zytor.com \
--cc=jason.wessel@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.