Skip to contentSkip to conversation

sh: multiple vectors per irq - base

PATCH New Magnus Damm 1 participant 1 message Feb 24, 2009 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 sh: multiple vectors per irq - base

From: Magnus Damm <[email protected]>

Instead of keeping the single vector -> single linux irq mapping we extend the intc code to support merging of vectors to a single linux irq. This helps processors such as sh7750, sh7780 and sh7785 which have more vectors than masking ability. With this patch in place we can modify the intc tables to use one irq per maskable irq source. Please note the following:

- If multiple vectors share the same enum then only the first vector will be available as a linux irq.

- Drivers may need to be rewritten to get pending irq source from the hardware block instead of irq number.

This patch together with the sh7785 specific intc tables solves DMA controller irq issues related to buggy interrupt masking.

---

 arch/sh/kernel/irq.c    |    2 +-
 drivers/sh/intc.c       |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/sh_intc.h |    1 +
 3 files changed, 49 insertions(+), 1 deletion(-)
arch/sh/kernel/irq.c +1 -1
@@ -106,7 +106,7 @@ asmlinkage int do_IRQ(unsigned int irq, 
 	}
 #endif
 
-	irq = irq_demux(evt2irq(irq));
+	irq = irq_demux(intc_evt2irq(irq));
 
 #ifdef CONFIG_IRQSTACKS
 	curctx = (union irq_ctx *)current_thread_info();
drivers/sh/intc.c +47 -0

67 lines not on this page · raw message

include/linux/sh_intc.h +1 -0
@@ -85,6 +85,7 @@ struct intc_desc symbol __initdata = {		
 }
 #endif
 
+unsigned int intc_evt2irq(unsigned int vector);
 void __init register_intc_controller(struct intc_desc *desc);
 int intc_set_priority(unsigned int irq, unsigned int prio);