diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2010-05-20 21:04:22 -0500 |
---|---|---|
committer | Jason Wessel <jason.wessel@windriver.com> | 2010-05-20 21:04:22 -0500 |
commit | f5316b4aea024da9266d740322a5481657f6ce59 (patch) | |
tree | 5888fd0afa54fc3bab2711e583147c4b563836bc /kernel/debug/debug_core.c | |
parent | dcc7871128e99458ca86186b7bc8bf27ff0c47b5 (diff) |
kgdb,8250,pl011: Return immediately from console poll
The design of the kdb shell requires that every device that can
provide input to kdb have a polling routine that exits immediately if
there is no character available. This is required in order to get the
page scrolling mechanism working.
Changing the kernel debugger I/O API to require all polling character
routines to exit immediately if there is no data allows the kernel
debugger to process multiple input channels.
NO_POLL_CHAR will be the return code to the polling routine when ever
there is no character available.
CC: linux-serial@vger.kernel.org
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Diffstat (limited to 'kernel/debug/debug_core.c')
-rw-r--r-- | kernel/debug/debug_core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c index 6e1fa829fde..1d71df66f3f 100644 --- a/kernel/debug/debug_core.c +++ b/kernel/debug/debug_core.c @@ -882,6 +882,8 @@ EXPORT_SYMBOL_GPL(kgdb_unregister_io_module); int dbg_io_get_char(void) { int ret = dbg_io_ops->read_char(); + if (ret == NO_POLL_CHAR) + return -1; if (!dbg_kdb_mode) return ret; if (ret == 127) |