diff options
author | Mike Travis <travis@sgi.com> | 2014-01-14 11:25:52 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-01-25 02:55:09 -0500 |
commit | fc8b13740b2978b34872650cc8e928392e3758aa (patch) | |
tree | b9f1420e4e6d1bf4adcfe48a2cda802f268ba42a /kernel | |
parent | 981c3a4ff8596a9dcd2b058ee12d6749639c32a5 (diff) |
kgdb/kdb: Fix no KDB config problem
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 dependency in the debug core code.
Update the call from the UV NMI handler to conform to the new
interface.
Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Hedi Berriche <hedi@sgi.com>
Cc: Russ Anderson <rja@sgi.com>
Cc: Jason Wessel <jason.wessel@windriver.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/20140114162551.318251993@asylum.americas.sgi.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/debug/debug_core.c | 5 | ||||
-rw-r--r-- | kernel/debug/debug_core.h | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c index 7d2f35e5df2f..334b3980ffc1 100644 --- a/kernel/debug/debug_core.c +++ b/kernel/debug/debug_core.c | |||
@@ -736,7 +736,8 @@ int kgdb_nmicallback(int cpu, void *regs) | |||
736 | return 1; | 736 | return 1; |
737 | } | 737 | } |
738 | 738 | ||
739 | int kgdb_nmicallin(int cpu, int trapnr, void *regs, atomic_t *send_ready) | 739 | int kgdb_nmicallin(int cpu, int trapnr, void *regs, int err_code, |
740 | atomic_t *send_ready) | ||
740 | { | 741 | { |
741 | #ifdef CONFIG_SMP | 742 | #ifdef CONFIG_SMP |
742 | if (!kgdb_io_ready(0) || !send_ready) | 743 | if (!kgdb_io_ready(0) || !send_ready) |
@@ -750,7 +751,7 @@ int kgdb_nmicallin(int cpu, int trapnr, void *regs, atomic_t *send_ready) | |||
750 | ks->cpu = cpu; | 751 | ks->cpu = cpu; |
751 | ks->ex_vector = trapnr; | 752 | ks->ex_vector = trapnr; |
752 | ks->signo = SIGTRAP; | 753 | ks->signo = SIGTRAP; |
753 | ks->err_code = KGDB_KDB_REASON_SYSTEM_NMI; | 754 | ks->err_code = err_code; |
754 | ks->linux_regs = regs; | 755 | ks->linux_regs = regs; |
755 | ks->send_ready = send_ready; | 756 | ks->send_ready = send_ready; |
756 | kgdb_cpu_enter(ks, regs, DCPU_WANT_MASTER); | 757 | kgdb_cpu_enter(ks, regs, DCPU_WANT_MASTER); |
diff --git a/kernel/debug/debug_core.h b/kernel/debug/debug_core.h index 572aa4f5677c..127d9bc49fb4 100644 --- a/kernel/debug/debug_core.h +++ b/kernel/debug/debug_core.h | |||
@@ -75,13 +75,11 @@ extern int kdb_stub(struct kgdb_state *ks); | |||
75 | extern int kdb_parse(const char *cmdstr); | 75 | extern int kdb_parse(const char *cmdstr); |
76 | extern int kdb_common_init_state(struct kgdb_state *ks); | 76 | extern int kdb_common_init_state(struct kgdb_state *ks); |
77 | extern int kdb_common_deinit_state(void); | 77 | extern int kdb_common_deinit_state(void); |
78 | #define KGDB_KDB_REASON_SYSTEM_NMI KDB_REASON_SYSTEM_NMI | ||
79 | #else /* ! CONFIG_KGDB_KDB */ | 78 | #else /* ! CONFIG_KGDB_KDB */ |
80 | static inline int kdb_stub(struct kgdb_state *ks) | 79 | static inline int kdb_stub(struct kgdb_state *ks) |
81 | { | 80 | { |
82 | return DBG_PASS_EVENT; | 81 | return DBG_PASS_EVENT; |
83 | } | 82 | } |
84 | #define KGDB_KDB_REASON_SYSTEM_NMI 0 | ||
85 | #endif /* CONFIG_KGDB_KDB */ | 83 | #endif /* CONFIG_KGDB_KDB */ |
86 | 84 | ||
87 | #endif /* _DEBUG_CORE_H_ */ | 85 | #endif /* _DEBUG_CORE_H_ */ |