[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZurdNw6lRYwClbuf@smile.fi.intel.com>
Date: Wed, 18 Sep 2024 17:01:27 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Petr Mladek <pmladek@...e.com>
Cc: John Ogness <john.ogness@...utronix.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
Esben Haabendal <esben@...nix.com>, linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org, Tony Lindgren <tony@...mide.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Arnd Bergmann <arnd@...db.de>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Serge Semin <fancer.lancer@...il.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Lino Sanfilippo <l.sanfilippo@...bus.com>
Subject: Re: [PATCH next v2 3/4] serial: 8250: Switch to nbcon console
On Wed, Sep 18, 2024 at 02:26:25PM +0200, Petr Mladek wrote:
> On Fri 2024-09-13 16:11:37, John Ogness wrote:
> > Implement the necessary callbacks to switch the 8250 console driver
> > to perform as an nbcon console.
> >
> > Add implementations for the nbcon console callbacks (write_atomic,
> > write_thread, device_lock, device_unlock) and add CON_NBCON to the
> > initial flags.
> >
> > All register access in the callbacks are within unsafe sections.
> > The write_thread() callback allows safe handover/takeover per byte.
> > The write_atomic() callback allows safe handover/takeover per
> > printk record and adds a preceding newline if it took over mid-line.
> >
> > For the write_atomic() case, a new irq_work is used to defer modem
> > control since it may be a context that does not allow waking up
> > tasks.
>
> It would be fair to mention that it does not longer support fifo in
> the 8250 driver. It basically reverted the commit 8f3631f0f6eb42e5
> ("serial/8250: Use fifo in 8250 console driver").
>
> It is not usable in write_thread() because it would not allow
> a safe takeover between emitting particular characters.
>
> It might still be used in write_atomic() but it is probably not
> worth it. This callback is used "only" in emergency and panic
> situations.
This is unfortunate. It will drop down the efficiency of printing.
I think it should be done differently, i.e. the takeover the code
has to drop FIFO (IIRC it's easy to achieve by disabling it or so)
and switch to printing the panic/emergency message. But still at
some baud rate speeds draining the FIFO to the other end may be
not a bad idea as it takes a few dozens of microseconds.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists