Skip to content

Commit

Permalink
[ARM] 4417/1: Serial: Fix AMBA drivers locking
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Russell King <[email protected]>
  • Loading branch information
KAGA-KOKO authored and Russell King committed May 30, 2007
1 parent 2ccdd1e commit 2389b27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion drivers/serial/amba-pl010.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion drivers/serial/amba-pl011.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2389b27

Please sign in to comment.