Thread (45 messages) 45 messages, 5 authors, 2017-11-02
STALE3129d

[PATCH 3/3] ARM: early_printk: use printascii() rather than printch()

From: robin.murphy@arm.com (Robin Murphy)
Date: 2017-10-31 16:38:09

On 31/10/17 16:22, Nicolas Pitre wrote:
On Tue, 31 Oct 2017, Chris Brandt wrote:
quoted
On Sunday, October 01, 2017 1, Nicolas Pitre wrote:
quoted
With printch() the console messages are sent out one character at a time
which is agonizingly slow especially with semihosting as the whole trap
intercept, remote byte access, and system resume danse is performed for
every single character across a relatively slow remote debug connection.
Let's use printascii() to send a whole string at once. This is also going
to be more efficient, albeit to a quite lesser extent, with serial ports
as well.

Signed-off-by: Nicolas Pitre <redacted>
---
 arch/arm/kernel/early_printk.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
Now that this patch has hit -next, I'm noticing an issue with it.

There are no carriage returns, just line feeds, which makes for a very 
ugly display.
Hmmm....

If you look at printascii in arch/arm/kernel/debug.S you'll find the 
following code:

1:              waituart r2, r3
                senduart r1, r3
                busyuart r2, r3
                teq     r1, #'\n'
                moveq   r1, #'\r'
                beq     1b

Why is that not working for you?
By inspection, the removed early_write() code inserted the '\r' before
the '\n' in the usual fashion; the printascii() code above ends up doing
the reverse, and I can imagine the atypical "\n\r" sequence probably
confuses some terminals trying to be clever with line ending detection.

Robin.
Are you using semihosting?

Do you have another printascii implementation?


Nicolas

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help