mbox series

[tty-next,v5,0/6] convert 8250 to nbcon

Message ID 20250107212702.169493-1-john.ogness@linutronix.de (mailing list archive)
Headers show
Series convert 8250 to nbcon | expand

Message

John Ogness Jan. 7, 2025, 9:26 p.m. UTC
This is v5 of a series to convert the 8250 driver to an NBCON
console, providing both threaded and atomic printing
implementations. v4 of this series is here [0]. Additional
background information about NBCON consoles in general is
available in the cover letter of v2 [1].

The changes since v4:

- In wait_for_lsr() use else-condition for fallback timeout.

- In fifo_wait_for_lsr() remove unnecessary return value.

- In serial8250_console_fifo_write() enter/exit unsafe section
  for each character to avoid writing to UART_TX on
  handover/takeover.

- In serial8250_console_byte_write() enter/exit unsafe section
  for each character rather than calling nbcon_can_proceed()
  for each character because nbcon_can_proceed() only checks
  ownership but does not actually handover if within an unsafe
  section. If there is a higher priority waiter, we want to
  handover ASAP so that printing can continue in the higher
  priority context.

- In serial8250_console_write() cleanup the implementation so
  that the procedure is more obvious.

- Add detailed multi-line comment documenting
  uart_8250_port->console_line_ended.

- Add and extend comments as requested.

John Ogness

[0] https://lore.kernel.org/lkml/20241227224523.28131-1-john.ogness@linutronix.de
[1] https://lore.kernel.org/lkml/20240913140538.221708-1-john.ogness@linutronix.de

John Ogness (6):
  serial: 8250: Adjust the timeout for FIFO mode
  serial: 8250: Use frame time to determine timeout
  serial: 8250: Use high-level writing function for FIFO
  serial: 8250: Provide flag for IER toggling for RS485
  serial: 8250: Switch to nbcon console
  serial: 8250: Revert "drop lockdep annotation from
    serial8250_clear_IER()"

 drivers/tty/serial/8250/8250.h            |   4 +-
 drivers/tty/serial/8250/8250_bcm2835aux.c |   4 +-
 drivers/tty/serial/8250/8250_core.c       |  35 ++-
 drivers/tty/serial/8250/8250_omap.c       |   2 +-
 drivers/tty/serial/8250/8250_port.c       | 259 +++++++++++++++++-----
 include/linux/serial_8250.h               |  17 +-
 6 files changed, 254 insertions(+), 67 deletions(-)


base-commit: 2c1fd53af21b8cb13878b054894d33d3383eb1f3