Skip to content

Commit a360f3f

Browse files
committed
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
2 parents 0a08238 + 698244b commit a360f3f

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

Documentation/devicetree/bindings/interrupt-controller/microchip,lan966x-oic.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ allOf:
1414

1515
description: |
1616
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.
2019
2120
properties:
2221
compatible:

drivers/irqchip/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ config IXP4XX_IRQ
169169

170170
config LAN966X_OIC
171171
tristate "Microchip LAN966x OIC Support"
172+
depends on MCHP_LAN966X_PCI || COMPILE_TEST
172173
select GENERIC_IRQ_CHIP
173174
select IRQ_DOMAIN
174175
help

drivers/irqchip/irq-apple-aic.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,8 @@ static void __exception_irq_entry aic_handle_fiq(struct pt_regs *regs)
577577
AIC_FIQ_HWIRQ(AIC_TMR_EL02_VIRT));
578578
}
579579

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)) {
581582
int irq;
582583
if (cpumask_test_cpu(smp_processor_id(),
583584
&aic_irqc->fiq_aff[AIC_CPU_PMU_P]->aff))

drivers/irqchip/irq-mvebu-icu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ static int mvebu_icu_translate(struct irq_domain *d, struct irq_fwspec *fwspec,
6868
unsigned long *hwirq, unsigned int *type)
6969
{
7070
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;
7273
struct mvebu_icu *icu = msi_data->icu;
7374

7475
/* Check the count of the parameters in dt */

drivers/irqchip/irq-riscv-imsic-early.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static void imsic_ipi_send(unsigned int cpu)
2727
{
2828
struct imsic_local_config *local = per_cpu_ptr(imsic->global.local, cpu);
2929

30-
writel_relaxed(IMSIC_IPI_ID, local->msi_va);
30+
writel(IMSIC_IPI_ID, local->msi_va);
3131
}
3232

3333
static void imsic_ipi_starting_cpu(void)

drivers/irqchip/irq-thead-c900-aclint-sswi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static DEFINE_PER_CPU(void __iomem *, sswi_cpu_regs);
3131

3232
static void thead_aclint_sswi_ipi_send(unsigned int cpu)
3333
{
34-
writel_relaxed(0x1, per_cpu(sswi_cpu_regs, cpu));
34+
writel(0x1, per_cpu(sswi_cpu_regs, cpu));
3535
}
3636

3737
static void thead_aclint_sswi_ipi_clear(void)

0 commit comments

Comments
 (0)