[PATCH] Revert "iommu/arm-smmu: Convert to domain_alloc_paging()"

Will Deacon will at kernel.org
Tue Feb 13 04:19:34 PST 2024


On Tue, Feb 13, 2024 at 08:12:57AM -0400, Jason Gunthorpe wrote:
> On Tue, Feb 13, 2024 at 01:31:56PM +0200, Dmitry Baryshkov wrote:
> > This reverts commit 9b3febc3a3da ("iommu/arm-smmu: Convert to
> > domain_alloc_paging()"). It breaks Qualcomm MSM8996 platform. Calling
> > arm_smmu_write_context_bank() from new codepath results in the platform
> > being reset because of the unclocked hardware access.
> > 
> > Fixes: 9b3febc3a3da ("iommu/arm-smmu: Convert to domain_alloc_paging()")
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
> > ---
> >  drivers/iommu/arm/arm-smmu/arm-smmu.c | 17 ++++++-----------
> >  1 file changed, 6 insertions(+), 11 deletions(-)
> 
> Please no, as I said in the other email the only thing that should be
> reverted is this:
> 
> > @@ -875,15 +879,6 @@ static struct iommu_domain *arm_smmu_domain_alloc_paging(struct device *dev)
> >  	mutex_init(&smmu_domain->init_mutex);
> >  	spin_lock_init(&smmu_domain->cb_lock);
> >  
> > -	if (dev) {
> > -		struct arm_smmu_master_cfg *cfg = dev_iommu_priv_get(dev);
> > -
> > -		if (arm_smmu_init_domain_context(smmu_domain, cfg->smmu, dev)) {
> > -			kfree(smmu_domain);
> > -			return NULL;
> > -		}
> > -	}
> > -
> >  	return &smmu_domain->domain;
> >  }
> 
> Everything else is fine, you already tested with that arrangement.

Partial reverts are a recipe for confusion, so I'll take this and if you'd
like to bring back some of the hunks, please can you send a patch on top
that does that?

Cheers,

Will



More information about the linux-arm-kernel mailing list