From: John Ogness <john.ogness@linutronix.de>
To: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>
Cc: "Andy Shevchenko" <andy.shevchenko@gmail.com>,
"Petr Mladek" <pmladek@suse.com>,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
linux-kernel@vger.kernel.org,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Hugo Villeneuve" <hvilleneuve@dimonoff.com>,
"Stepan Ionichev" <sozdayvek@gmail.com>,
"Kees Cook" <kees@kernel.org>, "Xin Zhao" <jackzxcui1989@163.com>,
linux-serial@vger.kernel.org
Subject: [PATCH tty v8 0/2] Convert 8250 to NBCON, take 2
Date: Wed, 22 Jul 2026 13:15:17 +0206 [thread overview]
Message-ID: <20260722110925.74387-1-john.ogness@linutronix.de> (raw)
Hi,
This is v8 of a series to convert the 8250 driver to an NBCON
console, providing both threaded and atomic printing
implementations. v7 of this series is here [0].
Note that v5 was pulled into the 6.14 merge window, but was
then reverted before the 6.14-rc1 release due to kernel test
robot problems. It turned out that the problems were related
to general 8250 driver issues. Those issues have now been
addressed mainline, paving the way for a second take at
converting the 8250 driver to NBCON.
The changes since v7:
- Perform the following renames to make it clear that these
fields and functions are only related to the console:
In struct uart_8250_port:
avoid_modem_status_work -> console_msr_work_allow
modem_status_work -> console_msr_work
The irq_work handler:
modem_status_handler() -> console_msr_handler()
Note that this also inverts the flag for allowing msr_work
in order to avoid using a double-negative for the reader:
if (!avoid_modem_status_work)
changes to:
if (console_msr_work_allow)
- Modify uart_8250_port->console_msr_work_allow under the
port->lock in order to synchronize with its reader
serial8250_console_write().
- In serial8250_suspend_port() and serial8250_resume_port(),
move the @console_msr_work_allow update inside
"if (uart_console(port))". This involves refactoring the
neighboring code as well and has the nice side-effect of
grouping all the console specialties into a single block.
- Change the IER-disabling comments in
serial8250_console_write() and serial8250_put_poll_char()
to mention what type of synchronization is used when the
port->lock is not taken.
The changes v6 -> v7:
- Add irq_work_sync() calls to make sure there is no pending
modem status work when suspending or unregistering the
console.
- In the put_poll_char() callback, use __serial8250_clear_IER()
because KDB/KGDB do not acquire the port lock to print.
- In serial8250_console_write(), re-enter unsafe section after
printing text, even if ownership was _not_ lost. The final
actions need to be performed within an unsafe section.
John Ogness
[0] https://lore.kernel.org/lkml/20260720135407.3925-1-john.ogness@linutronix.de
John Ogness (2):
serial: 8250: Switch to nbcon console, take 2
Revert "serial: 8250: drop lockdep annotation from
serial8250_clear_IER()"
drivers/tty/serial/8250/8250.h | 4 +-
drivers/tty/serial/8250/8250_core.c | 65 +++++++--
drivers/tty/serial/8250/8250_dw.c | 2 +-
drivers/tty/serial/8250/8250_port.c | 200 +++++++++++++++++++++++-----
include/linux/serial_8250.h | 16 ++-
5 files changed, 236 insertions(+), 51 deletions(-)
base-commit: 782f4dbd1794b4f30dc116a7ca42c5962c409be8
--
2.47.3
next reply other threads:[~2026-07-22 11:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 11:09 John Ogness [this message]
2026-07-22 11:09 ` [PATCH tty v8 1/2] serial: 8250: Switch to nbcon console, " John Ogness
2026-07-22 14:53 ` John Ogness
2026-07-23 11:04 ` Petr Mladek
2026-07-23 10:59 ` Petr Mladek
2026-07-22 11:09 ` [PATCH tty v8 2/2] Revert "serial: 8250: drop lockdep annotation from serial8250_clear_IER()" John Ogness
2026-07-23 11:05 ` Petr Mladek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260722110925.74387-1-john.ogness@linutronix.de \
--to=john.ogness@linutronix.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=bigeasy@linutronix.de \
--cc=gregkh@linuxfoundation.org \
--cc=hvilleneuve@dimonoff.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jackzxcui1989@163.com \
--cc=jirislaby@kernel.org \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=sozdayvek@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®