]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
printk: Allow printk_trigger_flush() to flush all types
authorJohn Ogness <john.ogness@linutronix.de>
Thu, 13 Nov 2025 16:03:47 +0000 (17:09 +0106)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Jan 2026 11:57:09 +0000 (12:57 +0100)
commitbe8ba672cc5ae52e8a10ac8eddb89d88f66b3cab
tree3a810b4370b9a313e78fa02653bf59135db1006f
parentb107196729ff6b9d6cde0a71f49c1243def43328
printk: Allow printk_trigger_flush() to flush all types

commit d01ff281bd9b1bfeac9ab98ec8a9ee41da900d5e upstream.

Currently printk_trigger_flush() only triggers legacy offloaded
flushing, even if that may not be the appropriate method to flush
for currently registered consoles. (The function predates the
NBCON consoles.)

Since commit 6690d6b52726 ("printk: Add helper for flush type
logic") there is printk_get_console_flush_type(), which also
considers NBCON consoles and reports all the methods of flushing
appropriate based on the system state and consoles available.

Update printk_trigger_flush() to use
printk_get_console_flush_type() to appropriately flush registered
consoles.

Suggested-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/stable/20251113160351.113031-2-john.ogness%40linutronix.de
Tested-by: Sherry Sun <sherry.sun@nxp.com>
Link: https://patch.msgid.link/20251113160351.113031-2-john.ogness@linutronix.de
Signed-off-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/printk/nbcon.c
kernel/printk/printk.c