Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1516348

Re: [REGRESSION] "console: don't prefer first registered if DT specifies stdout-path" breaks console on video outputs of various ARM boards

From Paul Burton <paul.burton@imgtec.com>
Newsgroups linux.kernel
Subject Re: [REGRESSION] "console: don't prefer first registered if DT specifies stdout-path" breaks console on video outputs of various ARM boards
Date 2016-11-07 18:20 +0100
Message-ID <sAVKp-6d8-3@gated-at.bofh.it> (permalink)
References <szLDr-1B0-5@gated-at.bofh.it> <sA7Xj-7Hu-17@gated-at.bofh.it> <sAtl7-4oj-15@gated-at.bofh.it>
Organization Imagination Technologies

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi Hans,

On Sunday, 6 November 2016 11:54:35 GMT Hans de Goede wrote:
> > What I see in my systems, and what 05fd007e4629 ("console: don't prefer
> > first registered if DT specifies stdout-path") addressed, is that if
> > there are for example 2 UARTs uart0 & uart1 that are probed in that order
> > and stdout-path indicates that we should use uart1 we wind up essentially
> > ignoring it because> 
> > the ordering of the relevant calls goes:
> >   - of_console_check() for uart0
> >   - add_preferred_console() for uart0
> >   - register_console() for uart0
> >   - of_console_check() for uart1
> >   - add_preferred_console() for uart1
> >   - register_console() for uart1
> > 
> > Since of_check_console() doesn't get called for uart1 until after uart0
> > has
> > been probed, we don't add an entry for it to the console_cmdline array
> > until after register_console() has already decided to enable uart0
> > because preferred_console == -1.
> > 
> > I'm not the only one seeing this oddity either, for example see the
> > discussion on this patch:
> > 
> > https://patchwork.kernel.org/patch/9263753/
> > 
> > By simply reverting my patch you restore us to a position where so far as
> > I
> > can see we simply do not honor stdout-path for the real kernel console.
> 
> As said before, we do still honor it, but in your probe example we also get
> a (second) serial console on uart0, where as you only want one on uart1.

...but don't we only support one console per type of device? That's what 
Documentation/serial-console.txt says anyway, which means having a console on 
both uart0 & uart1 does not work. I could live with having console output on 
an extra UART, but that's not what I was seeing when I wrote this patch.

> So I see a few possible solutions here:
> 
> 1) Do a new version of your patch which changes the  "&&
> !of_specified_console" check to "&& (newcon == tty0 ||
> !of_specified_console)", then we would still always register tty0 (as long
> as it gets registered first, just like now) and we would not register uart0
> in your above example, note the "newcon == tty0" check in my example is
> pseudo-code. I would be happy to try out such a patch
> 
> 2) Add a new dt property to enable the new behavior you seek
> 
> I'm myself tending towards 1 as a better solution: treat tty0 special,
> because some existing setups rely on it always being registered as a
> console even if stdout-path is specified and otherwise always honor
> stdout-path.
> 
> Regards,
> 
> Hans

That does feel a little hack-ish to me though... I don't like the reliance on 
probe ordering, nor special casing tty0 in general.

In any case I don't think I have the time to unpick all this at the moment, so 
I suggest we go ahead with your revert for now & I'll revisit the system I was 
working on when I find the time.

Thanks,
    Paul

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[REGRESSION] "console: don't prefer first registered if DT specifies stdout-path" breaks console on video outputs of various ARM boards Hans de Goede <hdegoede@redhat.com> - 2016-11-04 13:20 +0100
  [PATCH] Revert "console: don't prefer first registered if DT specifies stdout-path" Hans de Goede <hdegoede@redhat.com> - 2016-11-04 13:20 +0100
    Re: [PATCH] Revert  "console: don't prefer first registered if DT specifies stdout-path" Andrew Morton <akpm@linux-foundation.org> - 2016-11-04 20:40 +0100
    Re: [PATCH] Revert "console: don't prefer first registered if DT specifies stdout-path" Michael Ellerman <mpe@ellerman.id.au> - 2016-11-08 01:50 +0100
      Re: [PATCH] Revert "console: don't prefer first registered if DT  specifies stdout-path" Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-08 08:10 +0100
        Re: [PATCH] Revert "console: don't prefer first registered if DT  specifies stdout-path" Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-11-10 15:20 +0100
  Re: [REGRESSION] "console: don't prefer first registered if DT specifies stdout-path" breaks console on video outputs of various ARM boards Paul Burton <paul.burton@imgtec.com> - 2016-11-04 13:40 +0100
    Re: [REGRESSION] "console: don't prefer first registered if DT  specifies stdout-path" breaks console on video outputs of various ARM boards Hans de Goede <hdegoede@redhat.com> - 2016-11-04 14:30 +0100
      Re: [REGRESSION] "console: don't prefer first registered if DT specifies stdout-path" breaks console on video outputs of various ARM boards Paul Burton <paul.burton@imgtec.com> - 2016-11-05 13:10 +0100
        Re: [REGRESSION] "console: don't prefer first registered if DT  specifies stdout-path" breaks console on video outputs of various ARM boards Hans de Goede <hdegoede@redhat.com> - 2016-11-06 12:00 +0100
          Re: [REGRESSION] "console: don't prefer first registered if DT specifies stdout-path" breaks console on video outputs of various ARM boards Paul Burton <paul.burton@imgtec.com> - 2016-11-07 18:20 +0100
            Re: [REGRESSION] "console: don't prefer first registered if DT  specifies stdout-path" breaks console on video outputs of various ARM boards Hans de Goede <hdegoede@redhat.com> - 2016-11-08 10:20 +0100
      Re: [REGRESSION] "console: don't prefer first registered if DT specifies stdout-path" breaks console on video outputs of various ARM boards Paul Burton <paul.burton@imgtec.com> - 2016-11-05 13:20 +0100
  Re: [REGRESSION] "console: don't prefer first registered if DT  specifies stdout-path" breaks console on video outputs of various ARM boards Thorsten Leemhuis <regressions@leemhuis.info> - 2016-11-06 13:20 +0100

csiph-web