[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZurG8YMmBmVVxttj@pathway.suse.cz>
Date: Wed, 18 Sep 2024 14:26:25 +0200
From: Petr Mladek <pmladek@...e.com>
To: John Ogness <john.ogness@...utronix.de>
Cc: 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,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
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 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.
> Signed-off-by: John Ogness <john.ogness@...utronix.de>
Otherwise, it looks good to me. And it even works fine.
With an updated commit message:
Reviewed-by: Petr Mladek <pmladek@...e.com>
Best Regards,
Petr
Powered by blists - more mailing lists