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

Pull irq fixes from Thomas Gleixner:
"Three small fixes for interrupt core and drivers:

- The interrupt core fails to honor caller supplied affinity hints
for non-managed interrupts and uses the system default affinity on
startup instead. Set the missing flag in the descriptor to tell the
core to use the provided affinity.

- Fix a shift out of bounds error in the Xilinx driver

- Handle switching to level trigger correctly in the RISCV APLIC
driver. It failed to retrigger the interrupt which causes it to
become stale"

* tag 'irq-urgent-2024-08-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqchip/riscv-aplic: Retrigger MSI interrupt on source configuration
irqchip/xilinx: Fix shift out of bounds
genirq/irqdesc: Honor caller provided affinity in alloc_desc()

+27 -8
+25 -7
drivers/irqchip/irq-riscv-aplic-msi.c
··· 32 32 aplic_irq_unmask(d); 33 33 } 34 34 35 - static void aplic_msi_irq_eoi(struct irq_data *d) 35 + static void aplic_msi_irq_retrigger_level(struct irq_data *d) 36 36 { 37 37 struct aplic_priv *priv = irq_data_get_irq_chip_data(d); 38 - 39 - /* 40 - * EOI handling is required only for level-triggered interrupts 41 - * when APLIC is in MSI mode. 42 - */ 43 38 44 39 switch (irqd_get_trigger_type(d)) { 45 40 case IRQ_TYPE_LEVEL_LOW: ··· 52 57 writel(d->hwirq, priv->regs + APLIC_SETIPNUM_LE); 53 58 break; 54 59 } 60 + } 61 + 62 + static void aplic_msi_irq_eoi(struct irq_data *d) 63 + { 64 + /* 65 + * EOI handling is required only for level-triggered interrupts 66 + * when APLIC is in MSI mode. 67 + */ 68 + aplic_msi_irq_retrigger_level(d); 69 + } 70 + 71 + static int aplic_msi_irq_set_type(struct irq_data *d, unsigned int type) 72 + { 73 + int rc = aplic_irq_set_type(d, type); 74 + 75 + if (rc) 76 + return rc; 77 + /* 78 + * Updating sourcecfg register for level-triggered interrupts 79 + * requires interrupt retriggering when APLIC is in MSI mode. 80 + */ 81 + aplic_msi_irq_retrigger_level(d); 82 + return 0; 55 83 } 56 84 57 85 static void aplic_msi_write_msg(struct irq_data *d, struct msi_msg *msg) ··· 148 130 .name = "APLIC-MSI", 149 131 .irq_mask = aplic_msi_irq_mask, 150 132 .irq_unmask = aplic_msi_irq_unmask, 151 - .irq_set_type = aplic_irq_set_type, 133 + .irq_set_type = aplic_msi_irq_set_type, 152 134 .irq_eoi = aplic_msi_irq_eoi, 153 135 #ifdef CONFIG_SMP 154 136 .irq_set_affinity = irq_chip_set_affinity_parent,
+1 -1
drivers/irqchip/irq-xilinx-intc.c
··· 189 189 irqc->intr_mask = 0; 190 190 } 191 191 192 - if (irqc->intr_mask >> irqc->nr_irq) 192 + if ((u64)irqc->intr_mask >> irqc->nr_irq) 193 193 pr_warn("irq-xilinx: mismatch in kind-of-intr param\n"); 194 194 195 195 pr_info("irq-xilinx: %pOF: num_irq=%d, edge=0x%x\n",
+1
kernel/irq/irqdesc.c
··· 530 530 flags = IRQD_AFFINITY_MANAGED | 531 531 IRQD_MANAGED_SHUTDOWN; 532 532 } 533 + flags |= IRQD_AFFINITY_SET; 533 534 mask = &affinity->mask; 534 535 node = cpu_to_node(cpumask_first(mask)); 535 536 affinity++;