summaryrefslogtreecommitdiff
path: root/kernel/debug/kdb/kdb_debugger.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-08-03 10:53:47 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-08-03 10:53:47 -0700
commitd97e1dcde5e19ed1f828baff4ab5fd0e517c8dae (patch)
treeb383820ad8075479d31168cc35aabbb3bed35736 /kernel/debug/kdb/kdb_debugger.c
parent587a9e1f95794c05419d3bdb4c409a3274849f93 (diff)
parentf96a4216e85050c0a9d41a41ecb0ae9d8e39b509 (diff)
Merge tag 'for_linux-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb
Pull KGDB/KDB/usb-dbgp fixes and cleanups from Jason Wessel: "There are no new features, those will be delayed to the 3.7 window. There are only fixes/cleanup against the usual kernel churn and we are removing more lines than we add: - usb-dbgp - increase the controller wait time to come out of halt. - kdb - Remove unused KDB_FLAG_ONLY_DO_DUMP code and cpu in more prompt - debug core - pass NMI type on archs that provide NMI types" * tag 'for_linux-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb: USB: echi-dbgp: increase the controller wait time to come out of halt. kernel/debug: Make use of KGDB_REASON_NMI kdb: Remove cpu from the more prompt kdb: Remove unused KDB_FLAG_ONLY_DO_DUMP
Diffstat (limited to 'kernel/debug/kdb/kdb_debugger.c')
-rw-r--r--kernel/debug/kdb/kdb_debugger.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/debug/kdb/kdb_debugger.c b/kernel/debug/kdb/kdb_debugger.c
index 8b68ce78ff17..be7b33b73d30 100644
--- a/kernel/debug/kdb/kdb_debugger.c
+++ b/kernel/debug/kdb/kdb_debugger.c
@@ -12,6 +12,7 @@
#include <linux/kdb.h>
#include <linux/kdebug.h>
#include <linux/export.h>
+#include <linux/hardirq.h>
#include "kdb_private.h"
#include "../debug_core.h"
@@ -52,6 +53,9 @@ int kdb_stub(struct kgdb_state *ks)
if (atomic_read(&kgdb_setting_breakpoint))
reason = KDB_REASON_KEYBOARD;
+ if (in_nmi())
+ reason = KDB_REASON_NMI;
+
for (i = 0, bp = kdb_breakpoints; i < KDB_MAXBPT; i++, bp++) {
if ((bp->bp_enabled) && (bp->bp_addr == addr)) {
reason = KDB_REASON_BREAK;