serial: amba-pl011: lock console writes against interrupts
authorRabin Vincent <rabin.vincent@stericsson.com>
Tue, 17 Jan 2012 10:52:28 +0000 (11:52 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 25 Jan 2012 00:09:55 +0000 (16:09 -0800)
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.

Cc: stable <stable@vger.kernel.org>
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@suse.de>

No differences found