]> www.infradead.org Git - users/dwmw2/linux.git/commit
printk: nbcon: Add helper to assign priority based on CPU state
authorJohn Ogness <john.ogness@linutronix.de>
Tue, 20 Aug 2024 06:29:45 +0000 (08:35 +0206)
committerPetr Mladek <pmladek@suse.com>
Wed, 21 Aug 2024 12:56:24 +0000 (14:56 +0200)
commit06683a6649895ccf279c35ca2fb77fd7afb7a6c5
tree355dc59dd507da00cf47fbc5fa0777d99ae95e99
parentfc400d5f63570afdadd718ae962cf5aa0feeace6
printk: nbcon: Add helper to assign priority based on CPU state

Add a helper function to use the current state of the CPU to
determine which priority to assign to the printing context.

The EMERGENCY priority handling is added in a follow-up commit.
It will use a per-CPU variable.

Note: nbcon_device_try_acquire(), which is used by console
      drivers to acquire the nbcon console for non-printing
      activities, is hard-coded to always use NORMAL priority.

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