Skip to content

Commit 46b3df8

Browse files
rmurphy-armwilldeacon
authored andcommitted
iommu: Manage driver probe deferral better
Since iommu_fwspec_init() absorbed the basic driver probe deferral check to wait for an IOMMU to register, we may as well handle the probe deferral timeout there as well. The current inconsistency of callers results in client devices deferring forever on an arm64 ACPI system where an SMMU has failed its own driver probe. Acked-by: Will Deacon <[email protected]> Signed-off-by: Robin Murphy <[email protected]> Link: https://lore.kernel.org/r/41fa59f156ef8d196d08fa75c4901e6d4b12e6c4.1733406914.git.robin.murphy@arm.com Signed-off-by: Will Deacon <[email protected]>
1 parent fcbd621 commit 46b3df8

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

drivers/iommu/iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2819,7 +2819,7 @@ int iommu_fwspec_init(struct device *dev, struct fwnode_handle *iommu_fwnode)
28192819
struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
28202820

28212821
if (!ops)
2822-
return -EPROBE_DEFER;
2822+
return driver_deferred_probe_check_state(dev);
28232823

28242824
if (fwspec)
28252825
return ops == iommu_fwspec_ops(fwspec) ? 0 : -EINVAL;

drivers/iommu/of_iommu.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ static int of_iommu_xlate(struct device *dev,
2929
return -ENODEV;
3030

3131
ret = iommu_fwspec_init(dev, of_fwnode_handle(iommu_spec->np));
32-
if (ret == -EPROBE_DEFER)
33-
return driver_deferred_probe_check_state(dev);
3432
if (ret)
3533
return ret;
3634

0 commit comments

Comments
 (0)