All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tty: serial: meson_uart: Init port lock early
@ 2020-07-05  9:27 ` Marc Zyngier
  0 siblings, 0 replies; 10+ messages in thread
From: Marc Zyngier @ 2020-07-05  9:27 UTC (permalink / raw)
  To: gregkh
  Cc: khilman, linux-kernel, linux-serial, linux-amlogic,
	Andy Shevchenko, kernel-team

The meson UART driver triggers a lockdep splat at boot time, due
to the new expectation that the driver has to initialize the
per-port spinlock itself.

It remains unclear why a double initialization of the port
spinlock is a desirable outcome, but in the meantime let's
fix the splat.

Fixes: a3cb39d258ef ("serial: core: Allow detach and attach serial device for console")
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
 drivers/tty/serial/meson_uart.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
index d2c08b760f83..386e39c90628 100644
--- a/drivers/tty/serial/meson_uart.c
+++ b/drivers/tty/serial/meson_uart.c
@@ -759,6 +759,9 @@ static int meson_uart_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
+	/* Init the spinlock early in case this is the console */
+	spin_lock_init(&port->lock);
+
 	port->iotype = UPIO_MEM;
 	port->mapbase = res_mem->start;
 	port->mapsize = resource_size(res_mem);
-- 
2.26.2


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-07-05 15:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-05  9:27 [PATCH] tty: serial: meson_uart: Init port lock early Marc Zyngier
2020-07-05  9:27 ` Marc Zyngier
2020-07-05 10:07 ` Andy Shevchenko
2020-07-05 10:07   ` Andy Shevchenko
2020-07-05 10:28   ` Marc Zyngier
2020-07-05 10:28     ` Marc Zyngier
2020-07-05 11:22     ` Andy Shevchenko
2020-07-05 11:22       ` Andy Shevchenko
2020-07-05 15:51       ` Marc Zyngier
2020-07-05 15:51         ` Marc Zyngier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.