This is v2 of a series to allow unsafe write_atomic() console
callback implementations. This will allow console drivers to
move to the nbcon API, even if they are not capable of NMI-safe
atomic writing. The primary motivation for this series is to
support netconsole. v1 is here [0].
This version is based on the rework/nbcon-in-kdb branch of the
printk git in order to avoid conflicts due to the
console_is_usable() relocation.
The changes since v1:
- Use a global variable to track exactly when it is allowed to
flush using an unsafe write_atomic() rather than sprinkling
around similar checks based on states and code paths.
- Remove evil and incorrect WARN_ON() detection in
nbcon_emit_next_record().
John Ogness
[0] https://lore.kernel.org/lkml/20250912121852.2666874-1-john.ogness@linutronix.de
John Ogness (1):
printk: nbcon: Allow unsafe write_atomic() for panic
include/linux/console.h | 19 ++++++++++++++---
kernel/printk/nbcon.c | 45 ++++++++++++++++++++++++++++-------------
2 files changed, 47 insertions(+), 17 deletions(-)
base-commit: 62627bf0cadf6eae87d92fecf604c42160fe16ef
--
2.47.3