diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2007-05-29 16:53:50 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-05-30 09:33:01 -0400 |
commit | 2389b272168ceec056ca1d8a870a97fa9c26e11a (patch) | |
tree | e3a8be37e9e97bb8e232fbe6bd7823799e6899c1 /drivers | |
parent | 2ccdd1e77da52ad494e9af46bf272d816830cb28 (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')
-rw-r--r-- | drivers/serial/amba-pl010.c | 3 | ||||
-rw-r--r-- | drivers/serial/amba-pl011.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c index 1a9a24b82636..00d1255e4c12 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) | |||
167 | ignore_char: | 167 | ignore_char: |
168 | status = readb(uap->port.membase + UART01x_FR); | 168 | status = readb(uap->port.membase + UART01x_FR); |
169 | } | 169 | } |
170 | spin_unlock(&port->lock); | ||
170 | tty_flip_buffer_push(tty); | 171 | tty_flip_buffer_push(tty); |
171 | return; | 172 | spin_lock(&port->lock); |
172 | } | 173 | } |
173 | 174 | ||
174 | static void pl010_tx_chars(struct uart_amba_port *uap) | 175 | static void pl010_tx_chars(struct uart_amba_port *uap) |
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) | |||
153 | ignore_char: | 153 | ignore_char: |
154 | status = readw(uap->port.membase + UART01x_FR); | 154 | status = readw(uap->port.membase + UART01x_FR); |
155 | } | 155 | } |
156 | spin_unlock(&uap->port.lock); | ||
156 | tty_flip_buffer_push(tty); | 157 | tty_flip_buffer_push(tty); |
157 | return; | 158 | spin_lock(&uap->port.lock); |
158 | } | 159 | } |
159 | 160 | ||
160 | static void pl011_tx_chars(struct uart_amba_port *uap) | 161 | static void pl011_tx_chars(struct uart_amba_port *uap) |