summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <mpdesouza@suse.com>2024-11-05 22:45:08 +0300
committerPetr Mladek <pmladek@suse.com>2024-11-11 14:53:31 +0300
commited76c07c6885b249ce8486dac22fb97151a83185 (patch)
tree561f88a4019769122c588316516f0dc1172313dc /include/linux
parentc903327d3295b135eb8c81ebe0b68c1837718eb8 (diff)
downloadlinux-ed76c07c6885b249ce8486dac22fb97151a83185.tar.xz
printk: Introduce FORCE_CON flag
Introduce FORCE_CON flag to printk. The new flag will make it possible to create a context where printk messages will never be suppressed. This mechanism will be used in the next patch to create a force_con context on sysrq handling, removing an existing workaround on the loglevel global variable. The workaround existed to make sure that sysrq header messages were sent to all consoles, but this doesn't work with deferred messages because the loglevel might be restored to its original value before a console flushes the messages. Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com> Reviewed-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20241105-printk-loud-con-v2-1-bd3ecdf7b0e4@suse.com Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/printk.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/printk.h b/include/linux/printk.h
index eca9bb2ee637..232e5fd06701 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -166,6 +166,9 @@ __printf(1, 2) __cold int _printk_deferred(const char *fmt, ...);
extern void __printk_deferred_enter(void);
extern void __printk_deferred_exit(void);
+extern void printk_force_console_enter(void);
+extern void printk_force_console_exit(void);
+
/*
* The printk_deferred_enter/exit macros are available only as a hack for
* some code paths that need to defer all printk console printing. Interrupts