[PATCH v7 09/11] iommu/arm-smmu-v3: Enable pm_runtime and setup devlinks
Pranjal Shrivastava
praan at google.com
Thu May 28 14:36:58 PDT 2026
On Thu, May 28, 2026 at 01:13:40PM -0700, Nicolin Chen wrote:
> On Wed, May 27, 2026 at 10:14:05PM +0000, Pranjal Shrivastava wrote:
> > @@ -5592,11 +5595,18 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
> > if (ret)
> > goto err_disable;
> >
> > + 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);
> > + }
> > +
> > /* And we're up. Go go go! */
> > ret = iommu_device_sysfs_add(&smmu->iommu, dev, NULL,
> > "smmu3.%pa", &ioaddr);
> > if (ret)
> > - goto err_disable;
> > + goto err_rpm_disable;
> >
> > ret = iommu_device_register(&smmu->iommu, &arm_smmu_ops, dev);
> > if (ret) {
>
> Can we move the entire pm_runtime_* piece at the end of this probe
> function, like arm-smmu v2 driver does?
>
> It is no-fail, so we wouldn't need to add the revert path.
Hmm.. I kept it earlier since I thought iommu_device_register starts the
whole chain of probing masters, def_domain attach etc. but I guess it
could work, the client devices can attach during the initial probe
as pm_runtime remains disabled until registration is complete.
I'll just check if there are some weird edge cases here, just to be sure
>
> Otherwise,
> Reviewed-by: Nicolin Chen <nicolinc at nvidia.com>
Thanks!
Praan
More information about the linux-arm-kernel
mailing list