John Ogness 4126f149c4 serial: core: Acquire nbcon context in port->lock wrapper
Currently the port->lock wrappers uart_port_lock(),
uart_port_unlock() (and their variants) only lock/unlock
the spin_lock.

If the port is an nbcon console that has implemented the
write_atomic() callback, the wrappers must also acquire/release
the console context and mark the region as unsafe. This allows
general port->lock synchronization to be synchronized against
the nbcon write_atomic() callback.

Note that __uart_port_using_nbcon() relies on the port->lock
being held while a console is added and removed from the
console list (i.e. all uart nbcon drivers *must* take the
port->lock in their device_lock() callbacks).

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20240820063001.36405-15-john.ogness@linutronix.de
Signed-off-by: Petr Mladek <pmladek@suse.com>
2024-08-21 14:56:23 +02:00
..
2024-07-27 10:53:06 -07:00
2024-08-15 12:07:04 +02:00
2024-07-25 10:42:22 -07:00
2024-07-19 12:39:34 -07:00
2024-08-09 09:58:07 +02:00
2024-08-14 09:06:28 -07:00
2024-08-18 10:16:34 -07:00
2024-07-25 10:42:22 -07:00