[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241025105728.602310-1-john.ogness@linutronix.de>
Date: Fri, 25 Oct 2024 13:03:22 +0206
From: John Ogness <john.ogness@...utronix.de>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Jiri Slaby <jirislaby@...nel.org>,
Petr Mladek <pmladek@...e.com>,
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>,
Rengarajan S <rengarajan.s@...rochip.com>,
Jeff Johnson <quic_jjohnson@...cinc.com>,
Serge Semin <fancer.lancer@...il.com>,
Lino Sanfilippo <l.sanfilippo@...bus.com>,
Wander Lairson Costa <wander@...hat.com>,
Peter Collingbourne <pcc@...gle.com>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Stefan Wahren <wahrenst@....net>,
Uwe Kleine-König <u.kleine-koenig@...libre.com>,
Kevin Hilman <khilman@...libre.com>,
Markus Schneider-Pargmann <msp@...libre.com>,
Ronald Wahl <ronald.wahl@...itan.com>,
Udit Kumar <u-kumar1@...com>,
Griffin Kroah-Hartman <griffin@...ah.com>,
linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
Geert Uytterhoeven <geert+renesas@...der.be>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Tony Lindgren <tony@...mide.com>
Subject: [PATCH tty-next v3 0/6] convert 8250 to nbcon
This is v3 of a series to convert the 8250 driver to an NBCON
console, providing both threaded and atomic printing
implementations. v2 of this series is here [0], which also
contains additional background information about NBCON consoles
in general in the cover letter.
To test this version I acquired real hardware (TI AM3358
BeagleBone Black) and tested the following modes:
RS232
- no flow control
- software flow control
(UPF_SOFT_FLOW, UPSTAT_AUTOXOFF)
- hardware flow control
(UPF_HARD_FLOW, UPSTAT_AUTOCTS, UPSTAT_AUTORTS)
- software emulated hardware flow control
(UPF_CONS_FLOW, UPSTAT_CTS_ENABLE)
RS485
- with SER_RS485_RX_DURING_TX
- without SER_RS485_RX_DURING_TX
The tests focussed on kernel logging in various combinations of
normal, warning, and panic situations. Although not related to
the console printing code changes, the tests also included
using a getty/login session on the console.
Note that this UART (TI16750) supports a 64-byte TX-FIFO, which
is used in all console printing modes except for the software
emulated hardware flow control.
Here are the changes since v2:
- For RS485 start/stop TX, specify if called in console
context.
- For RS485 start/stop TX, when in console context, do not
disable/enable interrupts.
- Relocate modem_status_handler() to avoid unused static
function for some configs.
- Move LSR_THRE waiting into a new
serial8250_console_wait_putchar() function.
- For serial8250_console_fifo_write(), use
serial8250_console_putchar() for writing. This allows newline
tracking for FIFO mode as well.
- For serial8250_console_fifo_write(), allow 10ms timeout for
each byte written.
- Use FIFO mode for thread and atomic modes when available.
- Introduce serial8250_console_byte_write() to handle writing
when not using the FIFO mode.
- Consolidate thread and atomic callbacks. Now the only
difference is modem control: For atomic, called as irq_work.
For thread, called direct.
John Ogness
[0] 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 high-level write function for FIFO
serial: 8250: Split out rx stop/start code into helpers
serial: 8250: Specify console context for rs485_start/stop_tx
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 | 267 +++++++++++++++++-----
include/linux/serial_8250.h | 11 +-
6 files changed, 251 insertions(+), 72 deletions(-)
base-commit: 44059790a5cb9258ae6137387e4c39b717fd2ced
--
2.39.5
Powered by blists - more mailing lists