]> www.infradead.org Git - users/dwmw2/linux.git/commit
printk: nbcon: Add context to usable() and emit()
authorJohn Ogness <john.ogness@linutronix.de>
Wed, 4 Sep 2024 12:05:23 +0000 (14:11 +0206)
committerPetr Mladek <pmladek@suse.com>
Wed, 4 Sep 2024 13:56:32 +0000 (15:56 +0200)
commit6cb58cfebb293286f5ce8f6fba3e29122308e9e0
tree042fc5992291126854af46fa9a5272e0dd3dcff8
parent0e53e2d9f72080b7ea1a4003558041fee78cdef9
printk: nbcon: Add context to usable() and emit()

The nbcon consoles will have two callbacks to be used for
different contexts. In order to determine if an nbcon console
is usable, console_is_usable() must know if it is a context
that will need to use the optional write_atomic() callback.
Also, nbcon_emit_next_record() must know which callback it
needs to call.

Add an extra parameter @use_atomic to console_is_usable() and
nbcon_emit_next_record() to specify this.

Since so far only the write_atomic() callback exists,
@use_atomic is set to true for all call sites.

For legacy consoles, @use_atomic is not used.

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