]> www.infradead.org Git - users/dwmw2/linux.git/commit
printk: Track registered boot consoles
authorJohn Ogness <john.ogness@linutronix.de>
Tue, 20 Aug 2024 06:29:47 +0000 (08:35 +0206)
committerPetr Mladek <pmladek@suse.com>
Wed, 21 Aug 2024 12:56:24 +0000 (14:56 +0200)
commit97ea9bccfcbe4c97f127e736823cc8d984d781bf
treef9c7ad3e30f4fcd3b6d61f591f15fba274ac731d
parentd3a9f82ec5c095d6eb1eb94ecaa494470b4cef70
printk: Track registered boot consoles

Unfortunately it is not known if a boot console and a regular
(legacy or nbcon) console use the same hardware. For this reason
they must not be allowed to print simultaneously.

For legacy consoles this is not an issue because they are
already synchronized with the boot consoles using the console
lock. However nbcon consoles can be triggered separately.

Add a global flag @have_boot_console to identify if any boot
consoles are registered. This will be used in follow-up commits
to ensure that boot consoles and nbcon consoles cannot print
simultaneously.

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