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

Merge tag 'irqchip-fixes-5.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent

Pull irqchip fixes from Marc Zyngier:

- Address an issue with the SiFive PLIC being unable to EOI
a masked interrupt

- Move the disable/enable methods in the CSky mpintc to
mask/unmask

- Fix a regression in the OF irq code where an interrupt-controller
property in the same node as an interrupt-map property would get
ignored

Link: https://lore.kernel.org/all/20211112173459.4015233-1-maz@kernel.org

+27 -8
+4 -4
drivers/irqchip/irq-csky-mpintc.c
··· 78 78 readl_relaxed(reg_base + INTCL_RDYIR)); 79 79 } 80 80 81 - static void csky_mpintc_enable(struct irq_data *d) 81 + static void csky_mpintc_unmask(struct irq_data *d) 82 82 { 83 83 void __iomem *reg_base = this_cpu_read(intcl_reg); 84 84 ··· 87 87 writel_relaxed(d->hwirq, reg_base + INTCL_SENR); 88 88 } 89 89 90 - static void csky_mpintc_disable(struct irq_data *d) 90 + static void csky_mpintc_mask(struct irq_data *d) 91 91 { 92 92 void __iomem *reg_base = this_cpu_read(intcl_reg); 93 93 ··· 164 164 static struct irq_chip csky_irq_chip = { 165 165 .name = "C-SKY SMP Intc", 166 166 .irq_eoi = csky_mpintc_eoi, 167 - .irq_enable = csky_mpintc_enable, 168 - .irq_disable = csky_mpintc_disable, 167 + .irq_unmask = csky_mpintc_unmask, 168 + .irq_mask = csky_mpintc_mask, 169 169 .irq_set_type = csky_mpintc_set_type, 170 170 #ifdef CONFIG_SMP 171 171 .irq_set_affinity = csky_irq_set_affinity,
+7 -1
drivers/irqchip/irq-sifive-plic.c
··· 163 163 { 164 164 struct plic_handler *handler = this_cpu_ptr(&plic_handlers); 165 165 166 - writel(d->hwirq, handler->hart_base + CONTEXT_CLAIM); 166 + if (irqd_irq_masked(d)) { 167 + plic_irq_unmask(d); 168 + writel(d->hwirq, handler->hart_base + CONTEXT_CLAIM); 169 + plic_irq_mask(d); 170 + } else { 171 + writel(d->hwirq, handler->hart_base + CONTEXT_CLAIM); 172 + } 167 173 } 168 174 169 175 static struct irq_chip plic_chip = {
+16 -3
drivers/of/irq.c
··· 161 161 * if it is then we are done, unless there is an 162 162 * interrupt-map which takes precedence. 163 163 */ 164 + bool intc = of_property_read_bool(ipar, "interrupt-controller"); 165 + 164 166 imap = of_get_property(ipar, "interrupt-map", &imaplen); 165 - if (imap == NULL && 166 - of_property_read_bool(ipar, "interrupt-controller")) { 167 + if (imap == NULL && intc) { 167 168 pr_debug(" -> got it !\n"); 168 169 return 0; 169 170 } ··· 245 244 246 245 pr_debug(" -> imaplen=%d\n", imaplen); 247 246 } 248 - if (!match) 247 + if (!match) { 248 + if (intc) { 249 + /* 250 + * The PASEMI Nemo is a known offender, so 251 + * let's only warn for anyone else. 252 + */ 253 + WARN(!IS_ENABLED(CONFIG_PPC_PASEMI), 254 + "%pOF interrupt-map failed, using interrupt-controller\n", 255 + ipar); 256 + return 0; 257 + } 258 + 249 259 goto fail; 260 + } 250 261 251 262 /* 252 263 * Successfully parsed an interrrupt-map translation; copy new