From 2389b272168ceec056ca1d8a870a97fa9c26e11a Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 29 May 2007 21:53:50 +0100 Subject: [ARM] 4417/1: Serial: Fix AMBA drivers locking The -rt patch triggered a lockdep warning in the amba serial drivers, which never shows up on UP kernels. On SMP systems this would trigger as well. Release the port lock before calling tty_flip_buffer_push() and reacquire it after the call. This matches the code in the 8250 serial driver. Signed-off-by: Thomas Gleixner Signed-off-by: Russell King --- drivers/serial/amba-pl011.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/serial/amba-pl011.c') diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index 44639e71372a..954073c6ce3a 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c @@ -153,8 +153,9 @@ static void pl011_rx_chars(struct uart_amba_port *uap) ignore_char: status = readw(uap->port.membase + UART01x_FR); } + spin_unlock(&uap->port.lock); tty_flip_buffer_push(tty); - return; + spin_lock(&uap->port.lock); } static void pl011_tx_chars(struct uart_amba_port *uap) -- cgit v1.2.3