aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/kgdboc.c
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2010-05-20 22:04:30 -0400
committerJason Wessel <jason.wessel@windriver.com>2010-05-20 22:04:30 -0400
commit9731191f75a54c4fa17e9b9b88f3144cf4b47836 (patch)
treed9e0addc32948eab6755ba98c92dfb4d995200ce /drivers/serial/kgdboc.c
parent0bb9fef9134cf4fdcfce02f9adc22d3d0725cc29 (diff)
kgdboc: Add ekgdboc for early use of the kernel debugger
The ekgdboc= differs from kgdboc= in that you can begin debuggin as soon as the exceptions are setup and the kgdb I/O driver is available, instead of waiting until the tty subsystem is available. CC: kgdb-bugreport@lists.sourceforge.net Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Diffstat (limited to 'drivers/serial/kgdboc.c')
-rw-r--r--drivers/serial/kgdboc.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/serial/kgdboc.c b/drivers/serial/kgdboc.c
index b765ab48dfe7..a9a94ae72349 100644
--- a/drivers/serial/kgdboc.c
+++ b/drivers/serial/kgdboc.c
@@ -223,6 +223,25 @@ static struct kgdb_io kgdboc_io_ops = {
223 .post_exception = kgdboc_post_exp_handler, 223 .post_exception = kgdboc_post_exp_handler,
224}; 224};
225 225
226#ifdef CONFIG_KGDB_SERIAL_CONSOLE
227/* This is only available if kgdboc is a built in for early debugging */
228int __init kgdboc_early_init(char *opt)
229{
230 /* save the first character of the config string because the
231 * init routine can destroy it.
232 */
233 char save_ch;
234
235 kgdboc_option_setup(opt);
236 save_ch = config[0];
237 init_kgdboc();
238 config[0] = save_ch;
239 return 0;
240}
241
242early_param("ekgdboc", kgdboc_early_init);
243#endif /* CONFIG_KGDB_SERIAL_CONSOLE */
244
226module_init(init_kgdboc); 245module_init(init_kgdboc);
227module_exit(cleanup_kgdboc); 246module_exit(cleanup_kgdboc);
228module_param_call(kgdboc, param_set_kgdboc_var, param_get_string, &kps, 0644); 247module_param_call(kgdboc, param_set_kgdboc_var, param_get_string, &kps, 0644);