diff options
author | Viresh Kumar <viresh.kumar at linaro.org> | 2013-08-16 11:43:03 +0000 |
---|---|---|
committer | Gary S. Robertson <gary.robertson@linaro.org> | 2013-08-16 18:37:33 -0500 |
commit | 91f8fa012c1e9fd79f2fcd8c07fc31caeafc6848 (patch) | |
tree | e3cd0db6f277cb5497eb6daaa00871e056c14ba0 | |
parent | d9b8a041142ea90fbabb0985b2003207a8d280b5 (diff) |
tty: serial: altera: drop uart_port->lock before calling tty_flip_buffer_push()
The -rt patch triggers a lockdep warning for serial drivers if
tty_flip_buffer_push() is called with uart_port->lock locked. This never shows
up on UP kernels.
Release the port lock before calling tty_flip_buffer_push() and reacquire it
after the call.
Similar stuff was already done for few other drivers in the past, like:
commit 2389b272168ceec056ca1d8a870a97fa9c26e11a
Author: Thomas Gleixner <tglx at linutronix.de>
Date: Tue May 29 21:53:50 2007 +0100
[ARM] 4417/1: Serial: Fix AMBA drivers locking
Cc: Tobias Klauser <tklauser at distanz.ch>
Signed-off-by: Viresh Kumar <viresh.kumar at linaro.org>
-rw-r--r-- | drivers/tty/serial/altera_uart.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/altera_uart.c b/drivers/tty/serial/altera_uart.c index 13471dd95793..d983370eb05b 100644 --- a/drivers/tty/serial/altera_uart.c +++ b/drivers/tty/serial/altera_uart.c @@ -231,7 +231,9 @@ static void altera_uart_rx_chars(struct altera_uart *pp) flag); } + spin_unlock(&port->lock); tty_flip_buffer_push(&port->state->port); + spin_lock(&port->lock); } static void altera_uart_tx_chars(struct altera_uart *pp) |