Re: [PATCH RFC 10/11] iommu/arm-smmu-v3: Add IRQ mapping -EPROBE_DEFER handling
From: Ashok Raj
Date: Mon Sep 28 2026 - 18:41:40 EST
On Fri, Sep 25, 2026 at 09:48:09AM +0200, Lorenzo Pieralisi wrote:
> With the advent of GICv5, IRQs mapping can fail if the interrupt
> controller the wired SMMU interrupts are routed to has not probed
> yet when the SMMU driver probes.
>
> Handle -EPROBE_DEFER gracefully for IRQ mappings failures.
>
> Signed-off-by: Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx>
> Cc: Will Deacon <will@xxxxxxxxxx>
> Cc: Robin Murphy <robin.murphy@xxxxxxx>
> ---
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> index 5732f3ba0122..1832389916a4 100644
> --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> @@ -5562,18 +5562,26 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
> /* Interrupt lines */
>
> irq = platform_get_irq_byname_optional(pdev, "combined");
> + if (irq == -EPROBE_DEFER)
> + return dev_err_probe(dev, irq, "failed to get combined IRQ\n");
> if (irq > 0)
> smmu->combined_irq = irq;
> else {
> irq = platform_get_irq_byname_optional(pdev, "eventq");
> + if (irq == -EPROBE_DEFER)
> + return dev_err_probe(dev, irq, "failed to get eventq IRQ\n");
> if (irq > 0)
> smmu->evtq.q.irq = irq;
>
> irq = platform_get_irq_byname_optional(pdev, "priq");
> + if (irq == -EPROBE_DEFER)
> + return dev_err_probe(dev, irq, "failed to get priq IRQ\n");
> if (irq > 0)
> smmu->priq.q.irq = irq;
>
> irq = platform_get_irq_byname_optional(pdev, "gerror");
> + if (irq == -EPROBE_DEFER)
> + return dev_err_probe(dev, irq, "failed to get gerror IRQ\n");
> if (irq > 0)
> smmu->gerr_irq = irq;
> }
minor:
Maybe consolidate the multiple if (irq == -EPROBE_DEFER) parts and
consolidate the return to one place?
--
/ashok.raj
ashok.raj@xxxxxxxxxxxxxxxx
Qualcomm Inc