[PATCH printk v3 0/7] various cleanups

From: John Ogness
Date: Mon Jul 17 2023 - 15:46:18 EST


Hi,

This is v3 of a series providing some cleanup in preparation
for the threaded/atomic console work. v2 is here [0]. This
series provides useful cleanups independent of the
threaded/atomic work.

Changes since v2:

- "NMI safety" patch split into 3 patches: console_unblank,
keep non-panic CPUs out, do not lock console on panic flush.

- console_unblank() aborts if there are no consoles implementing
an unblank() callback. This check is performed before taking
the console lock.

- Commit messages and comments updated to mention the details
discussed in the v2 feedback.

John Ogness

[0] https://lore.kernel.org/lkml/20230710134524.25232-1-john.ogness@xxxxxxxxxxxxx

John Ogness (7):
kdb: Do not assume write() callback available
printk: Reduce console_unblank() usage in unsafe scenarios
printk: Keep non-panic-CPUs out of console lock
printk: Do not take console lock for console_flush_on_panic()
printk: Consolidate console deferred printing
printk: Add per-console suspended state
printk: Rename abandon_console_lock_in_panic() to other_cpu_in_panic()

include/linux/console.h | 3 +
kernel/debug/kdb/kdb_io.c | 2 +
kernel/printk/internal.h | 2 +
kernel/printk/printk.c | 213 +++++++++++++++++++++++++-----------
kernel/printk/printk_safe.c | 9 +-
5 files changed, 156 insertions(+), 73 deletions(-)


base-commit: 7ec85f3e089aa423a69559bf4555b6218b5a2ef7
--
2.30.2