aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Travis <travis@sgi.com>2013-10-02 11:14:18 -0400
committerIngo Molnar <mingo@kernel.org>2013-10-03 12:47:54 -0400
commit8daaa5f8261bffd2f6217a960f9182d0503a5c44 (patch)
tree2792d0b81d4165f234ffa22ea53b9a85d2819724 /include
parent8a1f4653f27ffd5d61088cf6b95c39bb13bf6132 (diff)
kdb: Add support for external NMI handler to call KGDB/KDB
This patch adds a kgdb_nmicallin() interface that can be used by external NMI handlers to call the KGDB/KDB handler. The primary need for this is for those types of NMI interrupts where all the CPUs have already received the NMI signal. Therefore no send_IPI(NMI) is required, and in fact it will cause a 2nd unhandled NMI to occur. This generates the "Dazed and Confuzed" messages. Since all the CPUs are getting the NMI at roughly the same time, it's not guaranteed that the first CPU that hits the NMI handler will manage to enter KGDB and set the dbg_master_lock before the slaves start entering. The new argument "send_ready" was added for KGDB to signal the NMI handler to release the slave CPUs for entry into KGDB. Signed-off-by: Mike Travis <travis@sgi.com> Acked-by: Jason Wessel <jason.wessel@windriver.com> Reviewed-by: Dimitri Sivanich <sivanich@sgi.com> Reviewed-by: Hedi Berriche <hedi@sgi.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Link: http://lkml.kernel.org/r/20131002151417.928886849@asylum.americas.sgi.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kdb.h1
-rw-r--r--include/linux/kgdb.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/kdb.h b/include/linux/kdb.h
index 7f6fe6e015bc..290db1269c4c 100644
--- a/include/linux/kdb.h
+++ b/include/linux/kdb.h
@@ -109,6 +109,7 @@ typedef enum {
109 KDB_REASON_RECURSE, /* Recursive entry to kdb; 109 KDB_REASON_RECURSE, /* Recursive entry to kdb;
110 * regs probably valid */ 110 * regs probably valid */
111 KDB_REASON_SSTEP, /* Single Step trap. - regs valid */ 111 KDB_REASON_SSTEP, /* Single Step trap. - regs valid */
112 KDB_REASON_SYSTEM_NMI, /* In NMI due to SYSTEM cmd; regs valid */
112} kdb_reason_t; 113} kdb_reason_t;
113 114
114extern int kdb_trap_printk; 115extern int kdb_trap_printk;
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
index c6e091bf39a5..dfb4f2ffdaa2 100644
--- a/include/linux/kgdb.h
+++ b/include/linux/kgdb.h
@@ -310,6 +310,7 @@ extern int
310kgdb_handle_exception(int ex_vector, int signo, int err_code, 310kgdb_handle_exception(int ex_vector, int signo, int err_code,
311 struct pt_regs *regs); 311 struct pt_regs *regs);
312extern int kgdb_nmicallback(int cpu, void *regs); 312extern int kgdb_nmicallback(int cpu, void *regs);
313extern int kgdb_nmicallin(int cpu, int trapnr, void *regs, atomic_t *snd_rdy);
313extern void gdbstub_exit(int status); 314extern void gdbstub_exit(int status);
314 315
315extern int kgdb_single_step; 316extern int kgdb_single_step;