[PATCH 12/13] RFC ONLY - kgdb,kdb: use async breakpoint for sysrq for usb
From: Jason Wessel
Date: Fri May 08 2009 - 17:28:32 EST
This is a RFC patch. The work to possibly merge kdb and kgdb is being
evaluated and this patch is considered only a proof of concept or
prototype.
For kdb, the usb keyboard will become disabled if you use a sysrq
sequence to enter kdb. Using a tasklet solves the problem.
Signed-off-by: Jason Wessel <jason.wessel@xxxxxxxxxxxxx>
---
kernel/kgdb.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/kernel/kgdb.c b/kernel/kgdb.c
index f303410..034f6eb 100644
--- a/kernel/kgdb.c
+++ b/kernel/kgdb.c
@@ -1817,8 +1817,18 @@ static void sysrq_handle_gdb(int key, struct tty_struct *tty)
printk(KERN_CRIT "Entering KGDB\n");
#endif
}
-
+#ifdef CONFIG_KDB_USB
+ /* XXX FIX ME XXX
+ * For now force the sysrq break point to be in a tasklet
+ * else if you send it from a usb keyboard, the keyboard cannot be
+ * used to interact with kdb because all the locks for the USB hcd
+ * device will be held. This probably needs a run time check
+ * against what i/o driver submitted the breakpoint request.
+ */
+ kgdb_schedule_breakpoint();
+#else /* ! CONFIG_KDB_USB */
kgdb_breakpoint();
+#endif /* CONFIG_KDB_USB */
}
static struct sysrq_key_op sysrq_gdb_op = {
--
1.6.3.rc0.1.gf800
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/