[PATCH] ARM: compress: Fix the debug prints

Linus Walleij linus.walleij at linaro.org
Sun Aug 9 16:49:01 EDT 2020


On Fri, Aug 7, 2020 at 2:59 PM Russell King - ARM Linux admin
<linux at armlinux.org.uk> wrote:
> On Fri, Aug 07, 2020 at 02:26:56PM +0200, Linus Walleij wrote:
> > @@ -49,8 +49,10 @@
> >
> >  #include CONFIG_DEBUG_LL_INCLUDE
> >
> > -             .macro  writeb, ch, rb
> > +             .macro  writeb, ch, rb, tmp
> > +             waituart \tmp, \rb
> >               senduart \ch, \rb
> > +             busyuart \tmp, \rb
> >               .endm
>
> This could likely cause problems.
>
> waituart does things such as waiting for CTS to be asserted, and we
> really don't want to block the decompressor if CTS is deasserted.
>
> busyuart should be mostly fine though, provided the UART is actually
> functional.

Oh I see, yeah the 8250 driver clearly does that.
I'll test with only busyuart.

I only copied this from debug.S which looks like this:

ENTRY(putc)
        addruart r1, r2, r3
        waituart r3, r1
        senduart r0, r1
        busyuart r3, r1
        mov      pc, lr
ENDPROC(putc)

This comes from commit 3b4af9bc2447
"ARM: 7672/1: uncompress debug support for multiplatform build"
I think we were just lucky that many kernels were using e.g.
PL01x and the 8250 users on multiplatform have been scratching
their head and wondered why the can't turn on
CONFIG_DEBUG_UNCOMPRESS.

I will test to drop waituart here as well, it seems it could lead to the
same problem here with 8250 UARTs.

> We haven't used either of these, we've relied on a software loop to
> wait some time before queueing the next character.

I think it mostly works, but I was baffled that I didn't get the debug
prints on this Qualcomm platforms, while the "Uncompressing Linux..."
message was working fine. Adding this made it work.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list