Subject: Re: [PATCH v7 09/11] iommu/arm-smmu-v3: Enable pm_runtime and setup devlinks

From: Pranjal Shrivastava <[email-masked]>
Date: Thu, 28 May 2026 21:36:58 +0000

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 <[email-masked]>

Thanks!
Praan