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);
57
57
58
58
extern void do_IRQ (unsigned int irq );
59
59
60
+ struct irq_domain ;
61
+ extern void do_domain_IRQ (struct irq_domain * domain , unsigned int irq );
62
+
60
63
extern void arch_init_irq (void );
61
64
extern void spurious_interrupt (void );
62
65
Original file line number Diff line number Diff line change 21
21
#include <linux/kallsyms.h>
22
22
#include <linux/kgdb.h>
23
23
#include <linux/ftrace.h>
24
+ #include <linux/irqdomain.h>
24
25
25
26
#include <linux/atomic.h>
26
27
#include <linux/uaccess.h>
@@ -107,3 +108,18 @@ void __irq_entry do_IRQ(unsigned int irq)
107
108
irq_exit ();
108
109
}
109
110
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 = {
127
127
asmlinkage void __weak plat_irq_dispatch (void )
128
128
{
129
129
unsigned long pending = read_c0_cause () & read_c0_status () & ST0_IM ;
130
- unsigned int virq ;
131
130
int irq ;
132
131
133
132
if (!pending ) {
@@ -137,12 +136,15 @@ asmlinkage void __weak plat_irq_dispatch(void)
137
136
138
137
pending >>= CAUSEB_IP ;
139
138
while (pending ) {
139
+ struct irq_domain * d ;
140
+
140
141
irq = fls (pending ) - 1 ;
141
142
if (IS_ENABLED (CONFIG_GENERIC_IRQ_IPI ) && irq < 2 )
142
- virq = irq_linear_revmap ( ipi_domain , irq ) ;
143
+ d = ipi_domain ;
143
144
else
144
- virq = irq_linear_revmap (irq_domain , irq );
145
- do_IRQ (virq );
145
+ d = irq_domain ;
146
+
147
+ do_domain_IRQ (d , irq );
146
148
pending &= ~BIT (irq );
147
149
}
148
150
}
Original file line number Diff line number Diff line change @@ -169,8 +169,8 @@ static void gic_handle_shared_int(bool chained)
169
169
generic_handle_domain_irq (gic_irq_domain ,
170
170
GIC_SHARED_TO_HWIRQ (intr ));
171
171
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 ));
174
174
}
175
175
}
176
176
@@ -320,8 +320,8 @@ static void gic_handle_local_int(bool chained)
320
320
generic_handle_domain_irq (gic_irq_domain ,
321
321
GIC_LOCAL_TO_HWIRQ (intr ));
322
322
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 ));
325
325
}
326
326
}
327
327
Original file line number Diff line number Diff line change @@ -42,11 +42,10 @@ static void __iomem *evic_base;
42
42
43
43
asmlinkage void __weak plat_irq_dispatch (void )
44
44
{
45
- unsigned int irq , hwirq ;
45
+ unsigned int hwirq ;
46
46
47
47
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 );
50
49
}
51
50
52
51
static 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);
682
682
* usually for a root interrupt controller
683
683
* @domain: The domain where to perform the lookup
684
684
* @hwirq: The HW irq number to convert to a logical one
685
- * @lookup: Whether to perform the domain lookup or not
686
685
* @regs: Register file coming from the low-level handling code
687
686
*
688
687
* Returns: 0 on success, or -EINVAL if conversion has failed
You can’t perform that action at this time.
0 commit comments