DOWNSTREAM: iommu/arm-smmu-v3: Fix arm_smmu_impl_ops

While backporting the upstream commit:
44a9231b800b454befac069d468e2f2b71827474
(iommu/arm-smmu-v3: Add struct arm_smmu_impl_ops)

it didn't apply correctly causing cmdqv reset not getting invoked during
resume. Fix it by moving the device reset in arm_smmu_device_reset as
in upstream commit.

Bug 5419379
Bug 5111712

Change-Id: Ifc873bccd0b43b4e6890ac5d6672b4ea3e71cc88
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/3rdparty/canonical/linux-noble/+/3452819
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
This commit is contained in:
Ashish Mhetre
2025-09-16 14:42:33 +00:00
parent c79ae7acb3
commit 5865348c39

View File

@@ -3452,6 +3452,14 @@ static int arm_smmu_device_reset(struct arm_smmu_device *smmu, bool bypass)
return ret; return ret;
} }
if (smmu->impl_ops && smmu->impl_ops->device_reset) {
ret = smmu->impl_ops->device_reset(smmu);
if (ret) {
dev_err(smmu->dev, "failed to reset impl\n");
return ret;
}
}
return 0; return 0;
} }
@@ -4035,14 +4043,6 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
goto err_free_sysfs; goto err_free_sysfs;
} }
if (smmu->impl_ops && smmu->impl_ops->device_reset) {
ret = smmu->impl_ops->device_reset(smmu);
if (ret) {
dev_err(smmu->dev, "failed to reset impl\n");
return ret;
}
}
return 0; return 0;
err_free_sysfs: err_free_sysfs: