[PATCH][FOR-2.6.39.4][SHR] s3c24xx: ACK the external interrupt source when no handler is available

Paul Fertser fercerpav at gmail.com
Tue Nov 26 12:22:31 CET 2013


The 2.6.39.4 version running on gta02 is sometimes (~0.5 - 4%) getting
stuck on resume. The inspection showed that it constantly reenters
s3c_irq_demux_extint8() but since all the external interrupts are
masked at that time, no downstream handler is called. As the result,
the corresponding SRCPND bit is never cleared and the handler reenters
right after exiting.

Even though the cause for external interrupts being masked while
there's a pending request present are still unclear, this patch seems
to be doing the right thing (at least for that old kernel version). My
device is running continious suspend/resume test for ~15 hours now
(while it used to hang in less than 30 minutes of the same test
before).

Thanks go to lindi- and gena2x for providing me with an openmoko debug
board.

Signed-off-by: Paul Fertser <fercerpav at gmail.com>
---
 arch/arm/plat-s3c24xx/irq.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/plat-s3c24xx/irq.c b/arch/arm/plat-s3c24xx/irq.c
index 1317f04..0bcaccb 100644
--- a/arch/arm/plat-s3c24xx/irq.c
+++ b/arch/arm/plat-s3c24xx/irq.c
@@ -484,6 +484,11 @@ s3c_irq_demux_extint8(unsigned int irq,
 	eintpnd &= ~eintmsk;
 	eintpnd &= ~0xff;	/* ignore lower irqs */
 
+	/* in case no IRQ is pending but we got here we still
+	   must ack the parent or else we get an irq storm */
+	if (!eintpnd)
+		s3c_irq_ack(irq_get_irq_data(IRQ_EINT8t23));
+	
 	/* we may as well handle all the pending IRQs here */
 
 	while (eintpnd) {
-- 
1.7.10




More information about the openmoko-kernel mailing list