From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org,
linux-rt-users <linux-rt-users@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Carsten Emde <C.Emde@osadl.org>, John Kacur <jkacur@redhat.com>,
<stable-rt@vger.kernel.org>
Subject: [PATCH RT 1/6] drivers-tty-pl011-irq-disable-madness.patch
Date: Wed, 06 Feb 2013 16:58:19 -0500 [thread overview]
Message-ID: <20130206215915.058901172@goodmis.org> (raw)
In-Reply-To: <20130206215818.969089606@goodmis.org>
[-- Attachment #1: 0001-drivers-tty-pl011-irq-disable-madness.patch.patch --]
[-- Type: text/plain, Size: 1482 bytes --]
From: Thomas Gleixner <tglx@linutronix.de>
Cc: stable-rt@vger.kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
drivers/tty/serial/amba-pl011.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index b69356c..7b29c92 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1788,13 +1788,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
@@ -1816,8 +1822,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);
}
--
1.7.10.4
next prev parent reply other threads:[~2013-02-06 21:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-06 21:58 [PATCH RT 0/6] [ANNOUNCE] 3.4.29-rt42-rc1 stable review Steven Rostedt
2013-02-06 21:58 ` Steven Rostedt [this message]
2013-02-06 21:58 ` [PATCH RT 2/6] mmci: Remove bogus local_irq_save() Steven Rostedt
2013-02-06 21:58 ` [PATCH RT 3/6] sched: Init idle->on_rq in init_idle() Steven Rostedt
2013-02-06 21:58 ` [PATCH RT 4/6] sched: Check for idle task in might_sleep() Steven Rostedt
2013-02-06 21:58 ` [PATCH RT 5/6] mm: swap: Initialize local locks early Steven Rostedt
2013-02-06 21:58 ` [PATCH RT 6/6] Linux 3.4.29-rt42-rc1 Steven Rostedt
2013-02-06 22:02 [PATCH RT 0/6] [ANNOUNCE] 3.2.38-rt57-rc1 stable review Steven Rostedt
2013-02-06 22:02 ` [PATCH RT 1/6] drivers-tty-pl011-irq-disable-madness.patch Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130206215915.058901172@goodmis.org \
--to=rostedt@goodmis.org \
--cc=C.Emde@osadl.org \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=stable-rt@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome