diff options
author | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-07-30 07:58:10 -0400 |
---|---|---|
committer | Jason Wessel <jason.wessel@windriver.com> | 2012-07-31 09:16:43 -0400 |
commit | b10d22d6e8f76b9e94871aebe0fc62aab2748200 (patch) | |
tree | fd2452bd709147091ac03f7d458d974e1f8d5ab4 /kernel/debug/kdb | |
parent | 07cd27bbd4d07af6c3e24ae479316a69e7935e1e (diff) |
kernel/debug: Make use of KGDB_REASON_NMI
Currently kernel never set KGDB_REASON_NMI. We do now, when we enter
KGDB/KDB from an NMI.
This is not to be confused with kgdb_nmicallback(), NMI callback is
an entry for the slave CPUs during CPUs roundup, but REASON_NMI is the
entry for the master CPU.
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Diffstat (limited to 'kernel/debug/kdb')
-rw-r--r-- | kernel/debug/kdb/kdb_debugger.c | 4 |
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 @@ | |||
12 | #include <linux/kdb.h> | 12 | #include <linux/kdb.h> |
13 | #include <linux/kdebug.h> | 13 | #include <linux/kdebug.h> |
14 | #include <linux/export.h> | 14 | #include <linux/export.h> |
15 | #include <linux/hardirq.h> | ||
15 | #include "kdb_private.h" | 16 | #include "kdb_private.h" |
16 | #include "../debug_core.h" | 17 | #include "../debug_core.h" |
17 | 18 | ||
@@ -52,6 +53,9 @@ int kdb_stub(struct kgdb_state *ks) | |||
52 | if (atomic_read(&kgdb_setting_breakpoint)) | 53 | if (atomic_read(&kgdb_setting_breakpoint)) |
53 | reason = KDB_REASON_KEYBOARD; | 54 | reason = KDB_REASON_KEYBOARD; |
54 | 55 | ||
56 | if (in_nmi()) | ||
57 | reason = KDB_REASON_NMI; | ||
58 | |||
55 | for (i = 0, bp = kdb_breakpoints; i < KDB_MAXBPT; i++, bp++) { | 59 | for (i = 0, bp = kdb_breakpoints; i < KDB_MAXBPT; i++, bp++) { |
56 | if ((bp->bp_enabled) && (bp->bp_addr == addr)) { | 60 | if ((bp->bp_enabled) && (bp->bp_addr == addr)) { |
57 | reason = KDB_REASON_BREAK; | 61 | reason = KDB_REASON_BREAK; |