Re: [PATCH RFC 10/11] iommu/arm-smmu-v3: Add IRQ mapping -EPROBE_DEFER handling
From: Lorenzo Pieralisi <lpieralisi@kernel.org>
Date: 2026-09-29 08:43:43
Also in:
driver-core, linux-acpi, linux-watchdog, lkml
On Mon, Sep 28, 2026 at 03:41:24PM -0700, Ashok Raj wrote:
On Fri, Sep 25, 2026 at 09:48:09AM +0200, Lorenzo Pieralisi wrote:quoted
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@kernel.org> Cc: Will Deacon <will@kernel.org> Cc: Robin Murphy <robin.murphy@arm.com> --- 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?
Yes that can be done, not even sure the different log strings are worth having in the first place. Again, the whole series aim is an RFC to understand what's best to implement the deferral mechanism, I patched the consumer drivers just for completeness. Thanks, Lorenzo