Message ID | 20241227224523.28131-1-john.ogness@linutronix.de (mailing list archive) |
---|---|
Headers | show |
Series | convert 8250 to nbcon | expand |
On Fri, Dec 27, 2024 at 11:51:16PM +0106, John Ogness wrote: > This is v4 of a series to convert the 8250 driver to an NBCON > console, providing both threaded and atomic printing > implementations. v3 of this series is here [0]. Additional > background information about NBCON consoles in general is > available in the cover letter of v2 [1]. Just to be sure I understand the side effect of this series, i.e. the https://elixir.bootlin.com/linux/v6.13-rc3/source/drivers/tty/serial/8250/8250_port.c#L44 https://elixir.bootlin.com/linux/v6.13-rc3/source/drivers/tty/serial/8250/8250_pci.c#L9 are not needed anymore (the first one can be replaced to something like dev_dbg() or analogue)?
On 2024-12-29, Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > On Fri, Dec 27, 2024 at 11:51:16PM +0106, John Ogness wrote: >> This is v4 of a series to convert the 8250 driver to an NBCON >> console, providing both threaded and atomic printing >> implementations. v3 of this series is here [0]. Additional >> background information about NBCON consoles in general is >> available in the cover letter of v2 [1]. > > Just to be sure I understand the side effect of this series, i.e. > the > > https://elixir.bootlin.com/linux/v6.13-rc3/source/drivers/tty/serial/8250/8250_port.c#L44 > https://elixir.bootlin.com/linux/v6.13-rc3/source/drivers/tty/serial/8250/8250_pci.c#L9 > > are not needed anymore (the first one can be replaced to something like > dev_dbg() or analogue)? Correct. With NBCON console drivers it is safe to call printk() while holding the port lock for non-console-printing purposes because: 1. printing via ->write_atomic() does not use the port lock and 2. printing via ->write_thread() is performed in a separate dedicated printing kthread that can safely spin on the port lock John
On 2024-12-27, John Ogness <john.ogness@linutronix.de> wrote: > The changes since v3: > > - For serial8250_console_fifo_write() and > serial8250_console_byte_write(), use nbcon_can_proceed() > rather than repeatedly enter/exit unsafe regions. I will revert this particular change for v5. It is necessary to exit/enter unsafe regions per character so that handovers can occur mid-line. Using nbcon_can_proceed() only allows the hostile takeover case to perform mid-line interruptions. John