[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHrpVsW6jRUYK_mu+dLaBvucAAtUPQ0zcH6_NxsUsTrPewiY_w@mail.gmail.com>
Date: Wed, 13 Nov 2019 17:28:45 -0800
From: Jonathan Richardson <jonathan.richardson@...adcom.com>
To: gregkh@...uxfoundation.org, jslaby@...e.com, pmladek@...e.com,
sergey.senozhatsky@...il.com
Cc: linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
Scott Branden <scott.branden@...adcom.com>,
Ray Jui <ray.jui@...adcom.com>,
Srinath Mannam <srinath.mannam@...adcom.com>
Subject: Re: console output duplicated when registering additional consoles
Adding printk maintainers.
This commit seems to have introduced the error:
commit f92b070f2dc89a8ff1a0cc8b608e20abef894c7d
Author: Petr Mladek <pmladek@...e.com>
Date: Thu Sep 13 14:34:06 2018 +0200
printk: Do not miss new messages when replaying the log
If I checkout to the commit before
(a06b0c82a049d34d4dc273e8692ed0894458c468), the console output is
normal when registering 2 bootconsoles and 2 normal consoles. I've
added the log for 4.19.0-rc3 for comparison (previous version was
5.1.0). I don't think this commit took into account that more than one
console could be registered. When the second console is registered,
'console_seq >= exclusive_console_stop_seq' is true (both are 0) and
exclusive_console is always set to NULL resulting in the log being
replayed again to the uart8250 console:
/* Output to all consoles once old messages replayed. */
if (unlikely(exclusive_console &&
console_seq >= exclusive_console_stop_seq)) {
exclusive_console = NULL;
}
I'm looking into it but any input is helpful. Thanks.
On Wed, Nov 6, 2019 at 5:09 PM Jonathan Richardson
<jonathan.richardson@...adcom.com> wrote:
>
> Hi,
>
> I have a console driver that registers an additional boot console and
> "normal" console. The command line is:
> earlycon=uart8250,mmio32,0x68A10000 console=ttyS0,115200n8
> earlylog=0x8f110000,0x10000
>
> When the second bootconsole is registered via register_console(), the
> output in the log buffer is written a second time to the uart8250
> console resulting in duplicate output. When the second "normal"
> console is registered the complete buffer is written again to
> uart8250. It looks like a bug in printk but I'm still trying to figure
> out how it's keeping track of what has been written to a console.
>
> I've attached the driver and uart8250 output.
>
> Thanks.
View attachment "console-output-4.19.txt" of type "text/plain" (45748 bytes)
Powered by blists - more mailing lists