File tree Expand file tree Collapse file tree 6 files changed +31
-12
lines changed Expand file tree Collapse file tree 6 files changed +31
-12
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,9 @@ asmlinkage void plat_irq_dispatch(void);
5757
5858extern void do_IRQ (unsigned int irq );
5959
60+ struct irq_domain ;
61+ extern void do_domain_IRQ (struct irq_domain * domain , unsigned int irq );
62+
6063extern void arch_init_irq (void );
6164extern void spurious_interrupt (void );
6265
Original file line number Diff line number Diff line change 2121#include <linux/kallsyms.h>
2222#include <linux/kgdb.h>
2323#include <linux/ftrace.h>
24+ #include <linux/irqdomain.h>
2425
2526#include <linux/atomic.h>
2627#include <linux/uaccess.h>
@@ -107,3 +108,18 @@ void __irq_entry do_IRQ(unsigned int irq)
107108 irq_exit ();
108109}
109110
111+ #ifdef CONFIG_IRQ_DOMAIN
112+ void __irq_entry do_domain_IRQ (struct irq_domain * domain , unsigned int hwirq )
113+ {
114+ struct irq_desc * desc ;
115+
116+ irq_enter ();
117+ check_stack_overflow ();
118+
119+ desc = irq_resolve_mapping (domain , hwirq );
120+ if (likely (desc ))
121+ handle_irq_desc (desc );
122+
123+ irq_exit ();
124+ }
125+ #endif
Original file line number Diff line number Diff line change @@ -127,7 +127,6 @@ static struct irq_chip mips_mt_cpu_irq_controller = {
127127asmlinkage void __weak plat_irq_dispatch (void )
128128{
129129 unsigned long pending = read_c0_cause () & read_c0_status () & ST0_IM ;
130- unsigned int virq ;
131130 int irq ;
132131
133132 if (!pending ) {
@@ -137,12 +136,15 @@ asmlinkage void __weak plat_irq_dispatch(void)
137136
138137 pending >>= CAUSEB_IP ;
139138 while (pending ) {
139+ struct irq_domain * d ;
140+
140141 irq = fls (pending ) - 1 ;
141142 if (IS_ENABLED (CONFIG_GENERIC_IRQ_IPI ) && irq < 2 )
142- virq = irq_linear_revmap ( ipi_domain , irq ) ;
143+ d = ipi_domain ;
143144 else
144- virq = irq_linear_revmap (irq_domain , irq );
145- do_IRQ (virq );
145+ d = irq_domain ;
146+
147+ do_domain_IRQ (d , irq );
146148 pending &= ~BIT (irq );
147149 }
148150}
Original file line number Diff line number Diff line change @@ -169,8 +169,8 @@ static void gic_handle_shared_int(bool chained)
169169 generic_handle_domain_irq (gic_irq_domain ,
170170 GIC_SHARED_TO_HWIRQ (intr ));
171171 else
172- do_IRQ ( irq_find_mapping (gic_irq_domain ,
173- GIC_SHARED_TO_HWIRQ (intr ) ));
172+ do_domain_IRQ (gic_irq_domain ,
173+ GIC_SHARED_TO_HWIRQ (intr ));
174174 }
175175}
176176
@@ -320,8 +320,8 @@ static void gic_handle_local_int(bool chained)
320320 generic_handle_domain_irq (gic_irq_domain ,
321321 GIC_LOCAL_TO_HWIRQ (intr ));
322322 else
323- do_IRQ ( irq_find_mapping (gic_irq_domain ,
324- GIC_LOCAL_TO_HWIRQ (intr ) ));
323+ do_domain_IRQ (gic_irq_domain ,
324+ GIC_LOCAL_TO_HWIRQ (intr ));
325325 }
326326}
327327
Original file line number Diff line number Diff line change @@ -42,11 +42,10 @@ static void __iomem *evic_base;
4242
4343asmlinkage void __weak plat_irq_dispatch (void )
4444{
45- unsigned int irq , hwirq ;
45+ unsigned int hwirq ;
4646
4747 hwirq = readl (evic_base + REG_INTSTAT ) & 0xFF ;
48- irq = irq_linear_revmap (evic_irq_domain , hwirq );
49- do_IRQ (irq );
48+ do_domain_IRQ (evic_irq_domain , hwirq );
5049}
5150
5251static struct evic_chip_data * irqd_to_priv (struct irq_data * data )
Original file line number Diff line number Diff line change @@ -682,7 +682,6 @@ EXPORT_SYMBOL_GPL(generic_handle_domain_irq);
682682 * usually for a root interrupt controller
683683 * @domain: The domain where to perform the lookup
684684 * @hwirq: The HW irq number to convert to a logical one
685- * @lookup: Whether to perform the domain lookup or not
686685 * @regs: Register file coming from the low-level handling code
687686 *
688687 * Returns: 0 on success, or -EINVAL if conversion has failed
You can’t perform that action at this time.
0 commit comments