serial21285: fix disable_irq-from-interrupt-handler deadlock
PATCH 1/1 serial21285: fix disable_irq-from-interrupt-handler deadlock
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.
---
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(-)
drivers/serial/21285.c +2 -2
@@ -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 ; } }
Signature · 1 line
1.6.0.4
PATCH 1/1 serial21285: fix disable_irq-from-interrupt-handler deadlock
Quoted 3 lines · Simon Kagstrom
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.
PATCH 1/1 serial21285: fix disable_irq-from-interrupt-handler deadlock
Quoted 7 lines · On Fri, 13 Nov 2009 09:59:37 +0000 Russell King - ARM Linux…
Quoted 3 lines · Simon Kagstrom
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
PATCH 1/1 serial21285: fix disable_irq-from-interrupt-handler deadlock
In reply to Russell King - ARM LinuxHi again Russell!
Quoted 7 lines · On Fri, 13 Nov 2009 09:59:37 +0000 Russell King - ARM Linux…
Quoted 3 lines · Simon Kagstrom
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
PATCH 1/1 serial21285: fix disable_irq-from-interrupt-handler deadlock
Quoted 10 lines · Simon Kagstrom
Hi again Russell!
Quoted 5 lines · On Fri, 13 Nov 2009 09:59:37 +0000 Russell King - ARM Linux…
Quoted 3 lines · Simon Kagstrom
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!
Quoted 7 lines
Quoted 2 lines
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
PATCH 1/1 serial21285: fix disable_irq-from-interrupt-handler deadlock
In reply to Simon KagstromQuoted 6 lines · Simon Kagstrom
The console hangs during bootup when
disable_irqis called from the transmit interrupt handler (it will wait forever for it's "own" interrupt insynchronize_irq). Fix by usingdisable_irq_nosync()instead.Signed-off-by Simon Kagstrom <[email protected]>
Quoted 38 lines
---
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(-)drivers/serial/21285.c +2
-2@@ -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 ; } }Signature · 7 lines
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
Signature · 5 lines
-- Ben Q: What's a light-year? A: One-third less calories than a regular year.