printk: nbcon: Init @nbcon_seq to highest possible
authorJohn Ogness <john.ogness@linutronix.de>
Wed, 4 Sep 2024 12:05:24 +0000 (14:11 +0206)
committerPetr Mladek <pmladek@suse.com>
Wed, 4 Sep 2024 13:56:32 +0000 (15:56 +0200)
commitfb9fabf3d86216961d1103ecbc33e98d5f6c48f5
tree055350c243e9ec4761c8171fbcd50e7353b2fddc
parent6cb58cfebb293286f5ce8f6fba3e29122308e9e0
printk: nbcon: Init @nbcon_seq to highest possible

When initializing an nbcon console, have nbcon_alloc() set
@nbcon_seq to the highest possible sequence number. For all
practical purposes, this will guarantee that the console
will have nothing to print until later when @nbcon_seq is
set to the proper initial printing value.

This will be particularly important once kthread printing is
introduced because nbcon_alloc() can create/start the kthread
before the desired initial sequence number is known.

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