diff options
| author | Jason Wessel <jason.wessel@windriver.com> | 2010-05-20 22:04:22 -0400 |
|---|---|---|
| committer | Jason Wessel <jason.wessel@windriver.com> | 2010-05-20 22:04:22 -0400 |
| commit | f5316b4aea024da9266d740322a5481657f6ce59 (patch) | |
| tree | 5888fd0afa54fc3bab2711e583147c4b563836bc /kernel/debug/kdb | |
| 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/kdb')
| -rw-r--r-- | kernel/debug/kdb/kdb_debugger.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/debug/kdb/kdb_debugger.c b/kernel/debug/kdb/kdb_debugger.c index f024c0c4b8c..bf6e8270e95 100644 --- a/kernel/debug/kdb/kdb_debugger.c +++ b/kernel/debug/kdb/kdb_debugger.c | |||
| @@ -20,7 +20,15 @@ | |||
| 20 | get_char_func kdb_poll_funcs[] = { | 20 | get_char_func kdb_poll_funcs[] = { |
| 21 | dbg_io_get_char, | 21 | dbg_io_get_char, |
| 22 | NULL, | 22 | NULL, |
| 23 | NULL, | ||
| 24 | NULL, | ||
| 25 | NULL, | ||
| 26 | NULL, | ||
| 23 | }; | 27 | }; |
| 28 | EXPORT_SYMBOL_GPL(kdb_poll_funcs); | ||
| 29 | |||
| 30 | int kdb_poll_idx = 1; | ||
| 31 | EXPORT_SYMBOL_GPL(kdb_poll_idx); | ||
| 24 | 32 | ||
| 25 | int kdb_stub(struct kgdb_state *ks) | 33 | int kdb_stub(struct kgdb_state *ks) |
| 26 | { | 34 | { |
| @@ -85,6 +93,7 @@ int kdb_stub(struct kgdb_state *ks) | |||
| 85 | kdb_bp_remove(); | 93 | kdb_bp_remove(); |
| 86 | KDB_STATE_CLEAR(DOING_SS); | 94 | KDB_STATE_CLEAR(DOING_SS); |
| 87 | KDB_STATE_CLEAR(DOING_SSB); | 95 | KDB_STATE_CLEAR(DOING_SSB); |
| 96 | KDB_STATE_SET(PAGER); | ||
| 88 | /* zero out any offline cpu data */ | 97 | /* zero out any offline cpu data */ |
| 89 | for_each_present_cpu(i) { | 98 | for_each_present_cpu(i) { |
| 90 | if (!cpu_online(i)) { | 99 | if (!cpu_online(i)) { |
| @@ -112,6 +121,7 @@ int kdb_stub(struct kgdb_state *ks) | |||
| 112 | kdb_initial_cpu = -1; | 121 | kdb_initial_cpu = -1; |
| 113 | kdb_current_task = NULL; | 122 | kdb_current_task = NULL; |
| 114 | kdb_current_regs = NULL; | 123 | kdb_current_regs = NULL; |
| 124 | KDB_STATE_CLEAR(PAGER); | ||
| 115 | kdbnearsym_cleanup(); | 125 | kdbnearsym_cleanup(); |
| 116 | if (error == KDB_CMD_KGDB) { | 126 | if (error == KDB_CMD_KGDB) { |
| 117 | if (KDB_STATE(DOING_KGDB) || KDB_STATE(DOING_KGDB2)) { | 127 | if (KDB_STATE(DOING_KGDB) || KDB_STATE(DOING_KGDB2)) { |
