Skip to content

Commit 2d00c34

Browse files
rmurphy-armwilldeacon
authored andcommitted
iommu/arm-smmu-v3: Fail aliasing StreamIDs more gracefully
We've never supported StreamID aliasing between devices, and as such they will never have had functioning DMA, but this is not fatal to the SMMU itself. Although aliasing between hard-wired platform device StreamIDs would tend to raise questions about the whole system, in practice it's far more likely to occur relatively innocently due to legacy PCI bridges, where the underlying StreamID mappings are still perfectly reasonable. As such, return a more benign -ENODEV when failing probe for such an unsupported device (and log a more obvious error message), so that it doesn't break the entire SMMU probe now that bus_iommu_probe() runs in the right order and can propagate that error back. The end result is still that the device doesn't get an IOMMU group and probably won't work, same as before. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/39d54e49c8476efc4653e352150d44b185d6d50f.1744380554.git.robin.murphy@arm.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent b00d249 commit 2d00c34

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3411,9 +3411,9 @@ static int arm_smmu_insert_master(struct arm_smmu_device *smmu,
34113411
continue;
34123412

34133413
dev_warn(master->dev,
3414-
"stream %u already in tree from dev %s\n", sid,
3415-
dev_name(existing_master->dev));
3416-
ret = -EINVAL;
3414+
"Aliasing StreamID 0x%x (from %s) unsupported, expect DMA to be broken\n",
3415+
sid, dev_name(existing_master->dev));
3416+
ret = -ENODEV;
34173417
break;
34183418
}
34193419
}

0 commit comments

Comments
 (0)