summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2010-05-20 21:04:29 -0500
committerJason Wessel <jason.wessel@windriver.com>2010-05-20 21:04:29 -0500
commit0b4b3827db386ec6034a5aba1261025b039440c2 (patch)
treea3469de6930fe3e850c8e4c49c26a2a3b53612dd /include
parent29c843912a0baa7fa63033fe28e1ca7e796686a5 (diff)
downloadop-kernel-dev-0b4b3827db386ec6034a5aba1261025b039440c2.zip
op-kernel-dev-0b4b3827db386ec6034a5aba1261025b039440c2.tar.gz
x86, kgdb, init: Add early and late debug states
The kernel debugger can operate well before mm_init(), but the x86 hardware breakpoint code which uses the perf api requires that the kernel allocators are initialized. This means the kernel debug core needs to provide an optional arch specific call back to allow the initialization functions to run after the kernel has been further initialized. The kdb shell already had a similar restriction with an early initialization and late initialization. The kdb_init() was moved into the debug core's version of the late init which is called dbg_late_init(); CC: kgdb-bugreport@lists.sourceforge.net Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kgdb.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
index 6c784ab..9340f34 100644
--- a/include/linux/kgdb.h
+++ b/include/linux/kgdb.h
@@ -208,6 +208,17 @@ extern int kgdb_arch_set_breakpoint(unsigned long addr, char *saved_instr);
extern int kgdb_arch_remove_breakpoint(unsigned long addr, char *bundle);
/**
+ * kgdb_arch_late - Perform any architecture specific initalization.
+ *
+ * This function will handle the late initalization of any
+ * architecture specific callbacks. This is an optional function for
+ * handling things like late initialization of hw breakpoints. The
+ * default implementation does nothing.
+ */
+extern void kgdb_arch_late(void);
+
+
+/**
* struct kgdb_arch - Describe architecture specific values.
* @gdb_bpt_instr: The instruction to trigger a breakpoint.
* @flags: Flags for the breakpoint, currently just %KGDB_HW_BREAKPOINT.
@@ -285,7 +296,10 @@ extern int kgdb_single_step;
extern atomic_t kgdb_active;
#define in_dbg_master() \
(raw_smp_processor_id() == atomic_read(&kgdb_active))
+extern bool dbg_is_early;
+extern void __init dbg_late_init(void);
#else /* ! CONFIG_KGDB */
#define in_dbg_master() (0)
+#define dbg_late_init()
#endif /* ! CONFIG_KGDB */
#endif /* _KGDB_H_ */
OpenPOWER on IntegriCloud