Re: [PATCH v4 10/10] iommu/arm-smmu-v3: Allow sharing domain across SMMUs

From: Nicolin Chen

Date: Thu Apr 09 2026 - 21:18:37 EST


On Thu, Apr 09, 2026 at 09:36:24PM -0300, Jason Gunthorpe wrote:
> On Thu, Apr 09, 2026 at 09:32:23PM -0300, Jason Gunthorpe wrote:

> Though something else is missing here, I expected this to be removed too:
>
> struct arm_smmu_domain {
> struct arm_smmu_device *smmu;

An, I didn't look into that very closely, as I vaguely recall that
we planned another series to clean this up.

> What is left using it?
>
> static int arm_smmu_s1_set_dev_pasid(struct iommu_domain *domain,
> struct device *dev, ioasid_t id,
> struct iommu_domain *old)
>
> int arm_smmu_set_pasid(struct arm_smmu_master *master,
> struct arm_smmu_domain *smmu_domain, ioasid_t pasid,
> struct arm_smmu_cd *cd, struct iommu_domain *old,
> arm_smmu_make_cd_fn make_cd_fn)
>
> Thous should use the new helper right? It should work for a S1 domain
> too.

Yes.

> static void arm_smmu_flush_iotlb_all(struct iommu_domain *domain)
> {
> struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
>
> if (smmu_domain->smmu)
> arm_smmu_tlb_inv_context(smmu_domain);
> }
>
> I suspect that is just dead code now, it is from before finalize was
> part of alloc?

It seems so. The invalidation doesn't need smmu_domain->smmu any
way.

I will clean this up in v5.

Thanks
Nicolin