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-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Ingo Molnar:
"Two fixes:

- Fix a MIPS IRQ handling RCU bug

- Remove a DocBook annotation for a parameter that doesn't exist
anymore"

* tag 'irq-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqchip/mips: Fix RCU violation when using irqdomain lookup on interrupt entry
genirq/irqdesc: Drop excess kernel-doc entry @lookup

+31 -12
+3
arch/mips/include/asm/irq.h
··· 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
+16
arch/mips/kernel/irq.c
··· 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> ··· 108 107 irq_exit(); 109 108 } 110 109 110 + #ifdef CONFIG_IRQ_DOMAIN 111 + void __irq_entry do_domain_IRQ(struct irq_domain *domain, unsigned int hwirq) 112 + { 113 + struct irq_desc *desc; 114 + 115 + irq_enter(); 116 + check_stack_overflow(); 117 + 118 + desc = irq_resolve_mapping(domain, hwirq); 119 + if (likely(desc)) 120 + handle_irq_desc(desc); 121 + 122 + irq_exit(); 123 + } 124 + #endif
+6 -4
drivers/irqchip/irq-mips-cpu.c
··· 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) { ··· 136 137 137 138 pending >>= CAUSEB_IP; 138 139 while (pending) { 140 + struct irq_domain *d; 141 + 139 142 irq = fls(pending) - 1; 140 143 if (IS_ENABLED(CONFIG_GENERIC_IRQ_IPI) && irq < 2) 141 - virq = irq_linear_revmap(ipi_domain, irq); 144 + d = ipi_domain; 142 145 else 143 - virq = irq_linear_revmap(irq_domain, irq); 144 - do_IRQ(virq); 146 + d = irq_domain; 147 + 148 + do_domain_IRQ(d, irq); 145 149 pending &= ~BIT(irq); 146 150 } 147 151 }
+4 -4
drivers/irqchip/irq-mips-gic.c
··· 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 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
+2 -3
drivers/irqchip/irq-pic32-evic.c
··· 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)
-1
kernel/irq/irqdesc.c
··· 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