From 69667e413b229667057f65dd804cf21059c06963 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 18 Oct 2023 17:49:37 +0200 Subject: [PATCH] printk: Update the printk series. This is an all-in-one update of the printk series. It updates from the previous version to the current development version which is under discussion plus the PREEMPT_RT bits for the atomic console. This updates the atomic console plus addresses some issues raised by the kernel robot. Signed-off-by: Sebastian Andrzej Siewior --- drivers/tty/serial/8250/8250_port.c | 4 ---- kernel/printk/printk.c | 4 +++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c index ed29d840070e..8c5f8bb16bd3 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -3498,10 +3498,6 @@ bool serial8250_console_write_atomic(struct uart_8250_port *up, if (up->em485) return false; - /* Atomic console does not support handling modem control. */ - if (up->msr_saved_flags) - return false; - touch_nmi_watchdog(); if (!nbcon_enter_unsafe(wctxt)) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 81ecec963423..8f2b52996568 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -282,6 +282,7 @@ EXPORT_SYMBOL(console_list_unlock); * Return: A cookie to pass to console_srcu_read_unlock(). */ int console_srcu_read_lock(void) + __acquires(&console_srcu) { return srcu_read_lock_nmisafe(&console_srcu); } @@ -295,6 +296,7 @@ EXPORT_SYMBOL(console_srcu_read_lock); * Counterpart to console_srcu_read_lock() */ void console_srcu_read_unlock(int cookie) + __releases(&console_srcu) { srcu_read_unlock_nmisafe(&console_srcu, cookie); } @@ -459,7 +461,7 @@ static int __read_mostly suppress_panic_printk; DECLARE_WAIT_QUEUE_HEAD(log_wait); -DECLARE_WAIT_QUEUE_HEAD(legacy_wait); +static DECLARE_WAIT_QUEUE_HEAD(legacy_wait); /* All 3 protected by @syslog_lock. */ /* the next printk record to read by syslog(READ) or /proc/kmsg */