serial: amba-pl011: lock console writes against interrupts
commit48aeab6f5551341a59275f88dff84c9fa7a19aff
authorRabin Vincent <rabin.vincent@stericsson.com>
Tue, 17 Jan 2012 10:52:28 +0000 (17 11:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Feb 2012 17:22:07 +0000 (3 09:22 -0800)
tree4cedba5f5630d6f89e5cf90f9cb46addef140e78
parent1fe9bb4495f86700f62021cf1f048007af92483c
serial: amba-pl011: lock console writes against interrupts

commit ef605fdb33883d687cff5ba75095a91b313b4966 upstream.

Protect against pl011_console_write() and the interrupt for
the console UART running concurrently on different CPUs.

Otherwise the console_write could spin for a long time
waiting for the UART to become not busy, while the other
CPU continuously services UART interrupts and keeps the
UART busy.

The checks for sysrq and oops_in_progress are taken
from 8250.c.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Reviewed-by: Bibek Basu <bibek.basu@stericsson.com>
Reviewed-by: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/amba-pl011.c