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

Merge tag 'irq-urgent-2025-02-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Thomas Gleixner:

- Ensure ordering of memory and device I/O for IPIs on RISCV

The RISCV interrupt controllers use writel_relaxed() for generating
an IPI. That's a device I/O write which is not guaranteed to be
ordered against preceding memory writes. As a consequence a IPI
receiving CPU might not be able to observe the actual IPI data which
is required to handle it. Switch to writel() which contains the
necessary memory barriers to enforce ordering.

- Fix up the fallout of the MSI conversion in the MVEVBU ICU driver.

The conversion failed to handle the change of the data storage and
kept the original code which uses the domain::host_data pointer
unchanged. After the conversion domain::host_data points to the new
msi_domain_info structure and not longer to the MVEBU specific MSI
data, which is now stored in a member of msi_domain_info. This leads
to malfunction of the transalate() callback.

- Only handle the PMC in FIQ mode when it is configured that way.

The original check was incorrect as it did not explicitely check for
the proper conditions, which led to malfunctions of the PMU
interrupt.

- Improve Kconfig dependencies for the LAN966x Outband Interrupt
controller to avoid pointless pronmpts.

* tag 'irq-urgent-2025-02-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqchip/apple-aic: Only handle PMC interrupt as FIQ when configured so
irqchip/irq-mvebu-icu: Fix access to msi_data from irq_domain::host_data
irqchip/riscv: Ensure ordering of memory writes and IPI writes
irqchip/lan966x-oic: Make CONFIG_LAN966X_OIC depend on CONFIG_MCHP_LAN966X_PCI
dt-bindings: interrupt-controller: microchip,lan966x-oic: Clarify endpoint use

+9 -7
+2 -3
Documentation/devicetree/bindings/interrupt-controller/microchip,lan966x-oic.yaml
··· 14 14 15 15 description: | 16 16 The Microchip LAN966x outband interrupt controller (OIC) maps the internal 17 - interrupt sources of the LAN966x device to an external interrupt. 18 - When the LAN966x device is used as a PCI device, the external interrupt is 19 - routed to the PCI interrupt. 17 + interrupt sources of the LAN966x device to a PCI interrupt when the LAN966x 18 + device is used as a PCI device. 20 19 21 20 properties: 22 21 compatible:
+1
drivers/irqchip/Kconfig
··· 169 169 170 170 config LAN966X_OIC 171 171 tristate "Microchip LAN966x OIC Support" 172 + depends on MCHP_LAN966X_PCI || COMPILE_TEST 172 173 select GENERIC_IRQ_CHIP 173 174 select IRQ_DOMAIN 174 175 help
+2 -1
drivers/irqchip/irq-apple-aic.c
··· 577 577 AIC_FIQ_HWIRQ(AIC_TMR_EL02_VIRT)); 578 578 } 579 579 580 - if (read_sysreg_s(SYS_IMP_APL_PMCR0_EL1) & PMCR0_IACT) { 580 + if ((read_sysreg_s(SYS_IMP_APL_PMCR0_EL1) & (PMCR0_IMODE | PMCR0_IACT)) == 581 + (FIELD_PREP(PMCR0_IMODE, PMCR0_IMODE_FIQ) | PMCR0_IACT)) { 581 582 int irq; 582 583 if (cpumask_test_cpu(smp_processor_id(), 583 584 &aic_irqc->fiq_aff[AIC_CPU_PMU_P]->aff))
+2 -1
drivers/irqchip/irq-mvebu-icu.c
··· 68 68 unsigned long *hwirq, unsigned int *type) 69 69 { 70 70 unsigned int param_count = static_branch_unlikely(&legacy_bindings) ? 3 : 2; 71 - struct mvebu_icu_msi_data *msi_data = d->host_data; 71 + struct msi_domain_info *info = d->host_data; 72 + struct mvebu_icu_msi_data *msi_data = info->chip_data; 72 73 struct mvebu_icu *icu = msi_data->icu; 73 74 74 75 /* Check the count of the parameters in dt */
+1 -1
drivers/irqchip/irq-riscv-imsic-early.c
··· 27 27 { 28 28 struct imsic_local_config *local = per_cpu_ptr(imsic->global.local, cpu); 29 29 30 - writel_relaxed(IMSIC_IPI_ID, local->msi_va); 30 + writel(IMSIC_IPI_ID, local->msi_va); 31 31 } 32 32 33 33 static void imsic_ipi_starting_cpu(void)
+1 -1
drivers/irqchip/irq-thead-c900-aclint-sswi.c
··· 31 31 32 32 static void thead_aclint_sswi_ipi_send(unsigned int cpu) 33 33 { 34 - writel_relaxed(0x1, per_cpu(sswi_cpu_regs, cpu)); 34 + writel(0x1, per_cpu(sswi_cpu_regs, cpu)); 35 35 } 36 36 37 37 static void thead_aclint_sswi_ipi_clear(void)