[PATCH] OMAP3: ack spurious IRQs in get_irqnr_and_base

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This prevents spurious interrupts from repeating unacked and
thus locking the system, while still allowing the spurious
bad irq error message to be shown on console.

Signed-off-by: Lauri Leukkunen <lauri.leukkunen@xxxxxxxxx>
---
 include/asm-arm/arch-omap/entry-macro.S |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/include/asm-arm/arch-omap/entry-macro.S b/include/asm-arm/arch-omap/entry-macro.S
index 5f5e254..662ac5c 100644
--- a/include/asm-arm/arch-omap/entry-macro.S
+++ b/include/asm-arm/arch-omap/entry-macro.S
@@ -84,8 +84,26 @@
 		ldr	\irqnr, [\base, #0xd8] /* IRQ pending reg 3 */
 		cmp	\irqnr, #0x0
 2222:
+#if defined(CONFIG_ARCH_OMAP34XX)
+		mov	\tmp, \irqnr
+#endif
 		ldrne	\irqnr, [\base, #IRQ_SIR_IRQ]
-
+#if defined(CONFIG_ARCH_OMAP34XX)
+		mov	\irqstat, \irqnr
+		bic	\irqstat, \irqstat, #0x7f /* check for spurious flag */
+		cmp	\irqstat, #0x0
+		beq	2223f
+		mov	\irqstat, #0x1 /* Ack the spurious irq, this lets it
+					* generate a bad irq error message,
+					* but prevents infinitely repeating
+					* irq.
+					*/
+		str	\irqstat, [\base, #0x48] /* INTC_CONTROL register */
+2223:
+		cmp	\tmp, #0x0 /* set conditional back to what it was
+				    * before spurious test
+				    */
+#endif
 		.endm
 
 		.macro	irq_prio_table
-- 
1.5.3.7

-
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux