aboutsummaryrefslogtreecommitdiff
path: root/drivers/serial/amba-pl010.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2007-05-29 21:53:50 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-05-30 14:33:01 +0100
commit2389b272168ceec056ca1d8a870a97fa9c26e11a (patch)
treee3a8be37e9e97bb8e232fbe6bd7823799e6899c1 /drivers/serial/amba-pl010.c
parent2ccdd1e77da52ad494e9af46bf272d816830cb28 (diff)
[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 <tglx@linutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/serial/amba-pl010.c')
-rw-r--r--drivers/serial/amba-pl010.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c
index 1a9a24b8263..00d1255e4c1 100644
--- a/drivers/serial/amba-pl010.c
+++ b/drivers/serial/amba-pl010.c
@@ -167,8 +167,9 @@ static void pl010_rx_chars(struct uart_amba_port *uap)
ignore_char:
status = readb(uap->port.membase + UART01x_FR);
}
+ spin_unlock(&port->lock);
tty_flip_buffer_push(tty);
- return;
+ spin_lock(&port->lock);
}
static void pl010_tx_chars(struct uart_amba_port *uap)