On Fri, Jan 22, 2021 at 02:04:55PM +0000, Robin Murphy wrote:
> > @@ -182,9 +183,13 @@ static void arm_smmu_mm_invalidate_range(struct 
> > mmu_notifier *mn,
> >                                      unsigned long start, unsigned long end)
> >   {
> >     struct arm_smmu_mmu_notifier *smmu_mn = mn_to_smmu(mn);
> > +   struct arm_smmu_domain *smmu_domain = smmu_mn->domain;
> > +   size_t size = end - start + 1;
> > -   arm_smmu_atc_inv_domain(smmu_mn->domain, mm->pasid, start,
> > -                           end - start + 1);
> > +   if (smmu_mn->tlb_inv_command)
> 
> Since we're going to be drilling down to smmu_domain->smmu->features in the
> invalidate call anyway, perhaps we could just test for BTM directly here?

Yes even with BTM enabled we'll still check features in atc_inv_domain(),
so this shortcut isn't useful.

Thanks,
Jean
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to