[PATCH RFC v2 7/9] iommu/arm-smmu: Add arm-smmu IRQ mapping -EPROBE_DEFER handling
Lorenzo Pieralisi
lpieralisi at kernel.org
Mon Nov 30 00:54:39 PST 2026
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 at kernel.org>
---
Cc: Will Deacon <will at kernel.org>
Cc: Robin Murphy <robin.murphy at arm.com>
---
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)
--
2.53.0
More information about the linux-arm-kernel
mailing list