[PATCH 3/3] ARM: early_printk: use printascii() rather than printch()
Nicolas Pitre
nicolas.pitre at linaro.org
Tue Oct 31 09:22:02 PDT 2017
On Tue, 31 Oct 2017, Chris Brandt wrote:
> On Sunday, October 01, 2017 1, Nicolas Pitre wrote:
> > 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 <nico at linaro.org>
> > ---
> > 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?
Are you using semihosting?
Do you have another printascii implementation?
Nicolas
More information about the linux-arm-kernel
mailing list