[PATCH v2 2/5] iommu/arm-smmu: Convert to a global static identity domain
Jason Gunthorpe
jgg at nvidia.com
Tue Dec 12 06:15:16 PST 2023
On Tue, Dec 12, 2023 at 01:27:08PM +0000, Will Deacon wrote:
> > +static int arm_smmu_attach_dev_identity(struct iommu_domain *domain,
> > + struct device *dev)
> > +{
> > + struct arm_smmu_master_cfg *cfg = dev_iommu_priv_get(dev);
> > + struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
> > + struct arm_smmu_device *smmu;
> > + int ret;
> > +
> > + if (!cfg)
> > + return -ENODEV;
> > + smmu = cfg->smmu;
> > +
> > + ret = arm_smmu_rpm_get(smmu);
> > + if (ret < 0)
> > + return ret;
> > +
> > + arm_smmu_master_install_s2crs(cfg, S2CR_TYPE_BYPASS, 0, fwspec);
> > +
> > + pm_runtime_set_autosuspend_delay(smmu->dev, 20);
> > + pm_runtime_use_autosuspend(smmu->dev);
>
> This is cargo-culted from arm_smmu_attach_dev() with the comments dropped
> and it's not clear at all to me that the autosuspend delay makes any sense
> for the identity domain.
Indeed, however it was how it worked before this split up.
> So I think it would be better to either drop the call to
> pm_runtime_set_autosuspend_delay()
I looked through it more carefully and this does seem like the right
thing, so I will drop them.
Thanks,
Jason
More information about the linux-arm-kernel
mailing list