Re: [PATCH RFC v2 7/9] iommu/arm-smmu: Add arm-smmu IRQ mapping -EPROBE_DEFER handling
From: Robin Murphy
Date: Fri Dec 04 2026 - 13:34:33 EST
On 30/11/2026 8:54 am, 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.
Reviewed-by: Robin Murphy <robin.murphy@xxxxxxx>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx>
---
Cc: Will Deacon <will@xxxxxxxxxx>
Cc: Robin Murphy <robin.murphy@xxxxxxx>
---
drivers/iommu/arm/arm-smmu/arm-smmu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c
index 889a0966d36c..fe85c3e17eeb 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c
@@ -2154,6 +2154,8 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
return PTR_ERR(smmu);
num_irqs = platform_irq_count(pdev);
+ if (num_irqs < 0)
+ return dev_err_probe(dev, num_irqs, "IRQ count failed\n");
smmu->num_context_irqs = num_irqs - global_irqs - pmu_irqs;
if (smmu->num_context_irqs <= 0)