[PATCH v9 10/12] iommu/arm-smmu-v3: Enable pm_runtime and setup devlinks
Pranjal Shrivastava
praan at google.com
Tue Jul 28 14:09:26 PDT 2026
Enable PM runtime for SMMUs having a power-domain during smmu probe.
Add a devlink between the clients and SMMU device. The absence of a
power domain effectively disables runtime power management.
Reviewed-by: Mostafa Saleh <smostafa at google.com>
Reviewed-by: Nicolin Chen <nicolinc at nvidia.com>
Signed-off-by: Pranjal Shrivastava <praan at google.com>
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
index 5f0e01dc4f6a..1253065b6db4 100644
--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
@@ -4431,6 +4431,9 @@ static struct iommu_device *arm_smmu_probe_device(struct device *dev)
if (ret)
goto err_disable_pasid;
+ device_link_add(dev, smmu->dev,
+ DL_FLAG_PM_RUNTIME | DL_FLAG_AUTOREMOVE_SUPPLIER);
+
return &smmu->iommu;
err_disable_pasid:
@@ -5821,6 +5824,13 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
return ret;
}
+ if (dev->pm_domain) {
+ pm_runtime_set_active(dev);
+ pm_runtime_use_autosuspend(dev);
+ pm_runtime_set_autosuspend_delay(dev, RPM_AUTOSUSPEND_DELAY_MS);
+ pm_runtime_enable(dev);
+ }
+
return 0;
}
--
2.55.0.487.gaf234c4eb3-goog
More information about the linux-arm-kernel
mailing list