]> www.infradead.org Git - users/dwmw2/linux.git/commit
printk: Add is_printk_legacy_deferred()
authorJohn Ogness <john.ogness@linutronix.de>
Tue, 20 Aug 2024 06:29:49 +0000 (08:35 +0206)
committerPetr Mladek <pmladek@suse.com>
Wed, 21 Aug 2024 12:56:24 +0000 (14:56 +0200)
commit70411bf8d22ab3d2f794f199d81d70b62d3a85fa
treed5a65ba6625f1616c88529ed2f7a83cc243882f5
parentc158834b223fbfab3a14855ac203b8d9cddbbefd
printk: Add is_printk_legacy_deferred()

If printk has been explicitly deferred or is called from NMI
context, legacy console printing must be deferred to an irq_work
context. Introduce a helper function is_printk_legacy_deferred()
for a CPU to query if it must defer legacy console printing.

In follow-up commits this helper will be needed at other call
sites as well.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20240820063001.36405-24-john.ogness@linutronix.de
Signed-off-by: Petr Mladek <pmladek@suse.com>
kernel/printk/internal.h
kernel/printk/printk_safe.c