lkml.org 
[lkml]   [2014]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] kdb: Put a cr before lf when working w/ a non open console port
From
Hi,

On Fri, Apr 18, 2014 at 10:17 AM, Doug Anderson <dianders@chromium.org> wrote:
> In (efe2f29 kgdboc,kdb: Allow kdb to work on a non open console port)
> support was added to directly use the "write_char" functions when
> doing kdb over a non-open console port. This is great, but it ends up
> bypassing the normal code in uart_console_write() that adds a carriage
> return before any newlines.
>
> Add similar code in kdb so we don't get things like:
> [0]kdb>
> [0]kdb>
> [0]kdb>
>
> Signed-off-by: Doug Anderson <dianders@chromium.org>
> ---
> kernel/debug/kdb/kdb_io.c | 6 ++++++
> 1 file changed, 6 insertions(+)

I've been digging through the code and I've finally figured out where
this happens on some other platforms (I'm using samsung/serial
myself).

The 8250 driver has it hardcoded in serial8250_put_poll_char(). Next
week I'll include a removal of that code with v2 of this patch unless
I hear any objections. I think doing things in kdb_io is nice
because:

* we don't need to duplicate the code in everyone's "put_poll_char" functions.

* we don't end up running the code in kgdb mode, only in kdb mode.

I could also move my change to be in uart_poll_put_char() which
_would_ (I believe) apply to both kdb / kgdb if that was desirable for
some reason.

-Doug


\
 
 \ /
  Last update: 2014-04-19 02:41    [W:0.050 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site