* [PATCH] serial21285: fix disable_irq-from-interrupt-handler deadlock
@ 2009-11-13 8:02 Simon Kagstrom
2009-11-13 9:59 ` Russell King - ARM Linux
2009-11-13 10:57 ` Ben Dooks
0 siblings, 2 replies; 6+ messages in thread
From: Simon Kagstrom @ 2009-11-13 8:02 UTC (permalink / raw)
To: linux-arm-kernel
The console hangs during bootup when disable_irq is called from the
transmit interrupt handler (it will wait forever for it's "own"
interrupt in synchronize_irq). Fix by using disable_irq_nosync()
instead.
Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
---
Russell: This patch is a bit of RFC since I'm not quite sure that it's the correct
solution. It unbreaks booting on our footbridge-based platform. Let me
know if I should look at other solutions!
drivers/serial/21285.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c
index 1e3d193..8681f13 100644
--- a/drivers/serial/21285.c
+++ b/drivers/serial/21285.c
@@ -58,7 +58,7 @@ static const char serial21285_name[] = "Footbridge UART";
static void serial21285_stop_tx(struct uart_port *port)
{
if (tx_enabled(port)) {
- disable_irq(IRQ_CONTX);
+ disable_irq_nosync(IRQ_CONTX);
tx_enabled(port) = 0;
}
}
@@ -74,7 +74,7 @@ static void serial21285_start_tx(struct uart_port *port)
static void serial21285_stop_rx(struct uart_port *port)
{
if (rx_enabled(port)) {
- disable_irq(IRQ_CONRX);
+ disable_irq_nosync(IRQ_CONRX);
rx_enabled(port) = 0;
}
}
--
1.6.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] serial21285: fix disable_irq-from-interrupt-handler deadlock
2009-11-13 8:02 [PATCH] serial21285: fix disable_irq-from-interrupt-handler deadlock Simon Kagstrom
@ 2009-11-13 9:59 ` Russell King - ARM Linux
2009-11-13 10:08 ` Simon Kagstrom
2009-12-17 7:51 ` Simon Kagstrom
2009-11-13 10:57 ` Ben Dooks
1 sibling, 2 replies; 6+ messages in thread
From: Russell King - ARM Linux @ 2009-11-13 9:59 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Nov 13, 2009 at 09:02:34AM +0100, Simon Kagstrom wrote:
> Russell: This patch is a bit of RFC since I'm not quite sure that it's
> the correct solution. It unbreaks booting on our footbridge-based
> platform. Let me know if I should look at other solutions!
It does look like the right thing to do - the original code will hang
now that we're using genirq stuff.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] serial21285: fix disable_irq-from-interrupt-handler deadlock
2009-11-13 9:59 ` Russell King - ARM Linux
@ 2009-11-13 10:08 ` Simon Kagstrom
2009-12-17 7:51 ` Simon Kagstrom
1 sibling, 0 replies; 6+ messages in thread
From: Simon Kagstrom @ 2009-11-13 10:08 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, 13 Nov 2009 09:59:37 +0000
Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> On Fri, Nov 13, 2009 at 09:02:34AM +0100, Simon Kagstrom wrote:
> > Russell: This patch is a bit of RFC since I'm not quite sure that it's
> > the correct solution. It unbreaks booting on our footbridge-based
> > platform. Let me know if I should look at other solutions!
>
> It does look like the right thing to do - the original code will hang
> now that we're using genirq stuff.
Good, thanks. I guess you'll take it into your tree then?
// Simon
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] serial21285: fix disable_irq-from-interrupt-handler deadlock
2009-11-13 8:02 [PATCH] serial21285: fix disable_irq-from-interrupt-handler deadlock Simon Kagstrom
2009-11-13 9:59 ` Russell King - ARM Linux
@ 2009-11-13 10:57 ` Ben Dooks
1 sibling, 0 replies; 6+ messages in thread
From: Ben Dooks @ 2009-11-13 10:57 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Nov 13, 2009 at 09:02:34AM +0100, Simon Kagstrom wrote:
> The console hangs during bootup when disable_irq is called from the
> transmit interrupt handler (it will wait forever for it's "own"
> interrupt in synchronize_irq). Fix by using disable_irq_nosync()
> instead.
>
> Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Acked-by: Ben Dooks <ben@simtec.co.uk>
> ---
> Russell: This patch is a bit of RFC since I'm not quite sure that it's the correct
> solution. It unbreaks booting on our footbridge-based platform. Let me
> know if I should look at other solutions!
>
> drivers/serial/21285.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c
> index 1e3d193..8681f13 100644
> --- a/drivers/serial/21285.c
> +++ b/drivers/serial/21285.c
> @@ -58,7 +58,7 @@ static const char serial21285_name[] = "Footbridge UART";
> static void serial21285_stop_tx(struct uart_port *port)
> {
> if (tx_enabled(port)) {
> - disable_irq(IRQ_CONTX);
> + disable_irq_nosync(IRQ_CONTX);
> tx_enabled(port) = 0;
> }
> }
> @@ -74,7 +74,7 @@ static void serial21285_start_tx(struct uart_port *port)
> static void serial21285_stop_rx(struct uart_port *port)
> {
> if (rx_enabled(port)) {
> - disable_irq(IRQ_CONRX);
> + disable_irq_nosync(IRQ_CONRX);
> rx_enabled(port) = 0;
> }
> }
> --
> 1.6.0.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
--
Ben
Q: What's a light-year?
A: One-third less calories than a regular year.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] serial21285: fix disable_irq-from-interrupt-handler deadlock
2009-11-13 9:59 ` Russell King - ARM Linux
2009-11-13 10:08 ` Simon Kagstrom
@ 2009-12-17 7:51 ` Simon Kagstrom
2010-01-10 12:26 ` Russell King - ARM Linux
1 sibling, 1 reply; 6+ messages in thread
From: Simon Kagstrom @ 2009-12-17 7:51 UTC (permalink / raw)
To: linux-arm-kernel
Hi again Russell!
On Fri, 13 Nov 2009 09:59:37 +0000
Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> On Fri, Nov 13, 2009 at 09:02:34AM +0100, Simon Kagstrom wrote:
> > Russell: This patch is a bit of RFC since I'm not quite sure that it's
> > the correct solution. It unbreaks booting on our footbridge-based
> > platform. Let me know if I should look at other solutions!
>
> It does look like the right thing to do - the original code will hang
> now that we're using genirq stuff.
I haven't see this patch in 2.6.33 yet, was it forgotten or is it still
in the queue somewhere?
(Ping!)
// Simon
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] serial21285: fix disable_irq-from-interrupt-handler deadlock
2009-12-17 7:51 ` Simon Kagstrom
@ 2010-01-10 12:26 ` Russell King - ARM Linux
0 siblings, 0 replies; 6+ messages in thread
From: Russell King - ARM Linux @ 2010-01-10 12:26 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Dec 17, 2009 at 08:51:42AM +0100, Simon Kagstrom wrote:
> Hi again Russell!
>
> On Fri, 13 Nov 2009 09:59:37 +0000
> Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
>
> > On Fri, Nov 13, 2009 at 09:02:34AM +0100, Simon Kagstrom wrote:
> > > Russell: This patch is a bit of RFC since I'm not quite sure that it's
> > > the correct solution. It unbreaks booting on our footbridge-based
> > > platform. Let me know if I should look at other solutions!
> >
> > It does look like the right thing to do - the original code will hang
> > now that we're using genirq stuff.
>
> I haven't see this patch in 2.6.33 yet, was it forgotten or is it still
> in the queue somewhere?
>
> (Ping!)
It needs to go into the patch system; I'm terrible with taking patches
directly from email.
Just add a 'KernelVersion:' tag to indicate which version the patch was
generated against somewhere in the patch description and forward to
patches at arm.linux.org.uk
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-01-10 12:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-13 8:02 [PATCH] serial21285: fix disable_irq-from-interrupt-handler deadlock Simon Kagstrom
2009-11-13 9:59 ` Russell King - ARM Linux
2009-11-13 10:08 ` Simon Kagstrom
2009-12-17 7:51 ` Simon Kagstrom
2010-01-10 12:26 ` Russell King - ARM Linux
2009-11-13 10:57 ` Ben Dooks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).