Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'irq-urgent-2020-04-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Thomas Gleixner:
"Two reverts addressing regressions of the Xilinx interrupt controller
driver which affected the PPC users"

* tag 'irq-urgent-2020-04-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
Revert "irqchip/xilinx: Enable generic irq multi handler"
Revert "irqchip/xilinx: Do not call irq_set_default_host()"

+38 -23
-2
arch/microblaze/Kconfig
··· 47 47 select CPU_NO_EFFICIENT_FFS 48 48 select MMU_GATHER_NO_RANGE if MMU 49 49 select SPARSE_IRQ 50 - select GENERIC_IRQ_MULTI_HANDLER 51 - select HANDLE_DOMAIN_IRQ 52 50 53 51 # Endianness selection 54 52 choice
+3
arch/microblaze/include/asm/irq.h
··· 11 11 struct pt_regs; 12 12 extern void do_IRQ(struct pt_regs *regs); 13 13 14 + /* should be defined in each interrupt controller driver */ 15 + extern unsigned int xintc_get_irq(void); 16 + 14 17 #endif /* _ASM_MICROBLAZE_IRQ_H */
+20 -1
arch/microblaze/kernel/irq.c
··· 20 20 #include <linux/irqchip.h> 21 21 #include <linux/of_irq.h> 22 22 23 + static u32 concurrent_irq; 24 + 23 25 void __irq_entry do_IRQ(struct pt_regs *regs) 24 26 { 27 + unsigned int irq; 28 + struct pt_regs *old_regs = set_irq_regs(regs); 25 29 trace_hardirqs_off(); 26 - handle_arch_irq(regs); 30 + 31 + irq_enter(); 32 + irq = xintc_get_irq(); 33 + next_irq: 34 + BUG_ON(!irq); 35 + generic_handle_irq(irq); 36 + 37 + irq = xintc_get_irq(); 38 + if (irq != -1U) { 39 + pr_debug("next irq: %d\n", irq); 40 + ++concurrent_irq; 41 + goto next_irq; 42 + } 43 + 44 + irq_exit(); 45 + set_irq_regs(old_regs); 27 46 trace_hardirqs_on(); 28 47 } 29 48
+15 -20
drivers/irqchip/irq-xilinx-intc.c
··· 124 124 return irq; 125 125 } 126 126 127 + unsigned int xintc_get_irq(void) 128 + { 129 + unsigned int irq = -1; 130 + u32 hwirq; 131 + 132 + hwirq = xintc_read(primary_intc, IVR); 133 + if (hwirq != -1U) 134 + irq = irq_find_mapping(primary_intc->root_domain, hwirq); 135 + 136 + pr_debug("irq-xilinx: hwirq=%d, irq=%d\n", hwirq, irq); 137 + 138 + return irq; 139 + } 140 + 127 141 static int xintc_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw) 128 142 { 129 143 struct xintc_irq_chip *irqc = d->host_data; ··· 175 161 generic_handle_irq(pending); 176 162 } while (true); 177 163 chained_irq_exit(chip, desc); 178 - } 179 - 180 - static void xil_intc_handle_irq(struct pt_regs *regs) 181 - { 182 - u32 hwirq; 183 - struct xintc_irq_chip *irqc = primary_intc; 184 - 185 - do { 186 - hwirq = xintc_read(irqc, IVR); 187 - if (likely(hwirq != -1U)) { 188 - int ret; 189 - 190 - ret = handle_domain_irq(irqc->root_domain, hwirq, regs); 191 - WARN_ONCE(ret, "Unhandled HWIRQ %d\n", hwirq); 192 - continue; 193 - } 194 - 195 - break; 196 - } while (1); 197 164 } 198 165 199 166 static int __init xilinx_intc_of_init(struct device_node *intc, ··· 245 250 } 246 251 } else { 247 252 primary_intc = irqc; 248 - set_handle_irq(xil_intc_handle_irq); 253 + irq_set_default_host(primary_intc->root_domain); 249 254 } 250 255 251 256 return 0;