diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-01-08 21:36:51 +0100 |
---|---|---|
committer | Steven Rostedt <rostedt@rostedt.homelinux.com> | 2013-04-23 11:35:21 -0400 |
commit | 4cac3e6f8d4ba04179ca2384657687dca1eb3fb2 (patch) | |
tree | 5aae907e6ff0ac3cacbbab59c9e0703dac179eda | |
parent | 2eb4c801912e678362e73f307cb97f849627c70c (diff) | |
download | linux-rt-4cac3e6f8d4ba04179ca2384657687dca1eb3fb2.tar.gz |
drivers-tty-pl011-irq-disable-madness.patch
Cc: stable-rt@vger.kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | drivers/tty/serial/amba-pl011.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 7cbb3679b804..40356ae70778 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -1754,13 +1754,19 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) clk_enable(uap->clk); - local_irq_save(flags); + /* + * local_irq_save(flags); + * + * This local_irq_save() is nonsense. If we come in via sysrq + * handling then interrupts are already disabled. Aside of + * that the port.sysrq check is racy on SMP regardless. + */ if (uap->port.sysrq) locked = 0; else if (oops_in_progress) - locked = spin_trylock(&uap->port.lock); + locked = spin_trylock_irqsave(&uap->port.lock, flags); else - spin_lock(&uap->port.lock); + spin_lock_irqsave(&uap->port.lock, flags); /* * First save the CR then disable the interrupts @@ -1782,8 +1788,7 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) writew(old_cr, uap->port.membase + UART011_CR); if (locked) - spin_unlock(&uap->port.lock); - local_irq_restore(flags); + spin_unlock_irqrestore(&uap->port.lock, flags); clk_disable(uap->clk); } |