linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: OMAP2+: Use handle_fasteoi_irq for INTC interrupt handling
@ 2014-02-24 10:09 Stefan Sørensen
  2014-02-28 17:11 ` Tony Lindgren
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Sørensen @ 2014-02-24 10:09 UTC (permalink / raw)
  To: tony, linux-omap; +Cc: Stefan Sørensen

Currently INTC interrupts are handled using handle_level_irq which
will acknowledge the interrupt before running the handler. If a second
interrupt is then asserted and this interrupt is disabled while
running the first handler, the INTC will be brought into an
inconsistent state. In this state the INTC will interrupt the CPU but
the interrupt pending registers will show no pending interrupts
causing the CPU to take no action. This will repeat until another
higher priority interrupt triggers, hogging the CPU.

handle_fasteoi_irq does not acknowledge the interrupt before after
running the handler, so using this for handling INTC interrupts avoid
the above problem. This also brings the handling more in line with the
sequence described in the TRM.

Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
---
 arch/arm/mach-omap2/irq.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index e022a86..9d09914 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -97,12 +97,6 @@ static void omap_ack_irq(struct irq_data *d)
 	intc_bank_write_reg(0x1, &irq_banks[0], INTC_CONTROL);
 }
 
-static void omap_mask_ack_irq(struct irq_data *d)
-{
-	irq_gc_mask_disable_reg(d);
-	omap_ack_irq(d);
-}
-
 static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank)
 {
 	unsigned long tmp;
@@ -145,9 +139,9 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
 	struct irq_chip_type *ct;
 
 	gc = irq_alloc_generic_chip("INTC", 1, irq_start, base,
-					handle_level_irq);
+					handle_fasteoi_irq);
 	ct = gc->chip_types;
-	ct->chip.irq_ack = omap_mask_ack_irq;
+	ct->chip.irq_eoi = omap_ack_irq;
 	ct->chip.irq_mask = irq_gc_mask_disable_reg;
 	ct->chip.irq_unmask = irq_gc_unmask_enable_reg;
 	ct->chip.flags |= IRQCHIP_SKIP_SET_WAKE;
-- 
1.8.5.3

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-03-06 18:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-24 10:09 [PATCH] ARM: OMAP2+: Use handle_fasteoi_irq for INTC interrupt handling Stefan Sørensen
2014-02-28 17:11 ` Tony Lindgren
2014-03-01  9:59   ` Sørensen, Stefan
2014-03-02 17:37     ` Tony Lindgren
2014-03-03 11:05       ` Sørensen, Stefan
2014-03-03 17:49         ` Tony Lindgren
2014-03-06 14:32           ` Sørensen, Stefan
2014-03-06 18:15             ` Tony Lindgren

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).