All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Philippe Brucker <jean-philippe@linaro.org>
To: Robin Murphy <robin.murphy@arm.com>
Cc: vivek.gautam@arm.com, iommu@lists.linux-foundation.org,
	zhangfei.gao@linaro.org, will@kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/3] iommu/arm-smmu-v3: Make BTM optional for SVA
Date: Fri, 22 Jan 2021 15:13:24 +0100	[thread overview]
Message-ID: <YArdhKeLJ0w6nHCS@myrica> (raw)
In-Reply-To: <14f78aee-c7fd-22ff-64d4-6aff2e9ec015@arm.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Jean-Philippe Brucker <jean-philippe@linaro.org>
To: Robin Murphy <robin.murphy@arm.com>
Cc: joro@8bytes.org, vivek.gautam@arm.com,
	iommu@lists.linux-foundation.org, zhangfei.gao@linaro.org,
	will@kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/3] iommu/arm-smmu-v3: Make BTM optional for SVA
Date: Fri, 22 Jan 2021 15:13:24 +0100	[thread overview]
Message-ID: <YArdhKeLJ0w6nHCS@myrica> (raw)
In-Reply-To: <14f78aee-c7fd-22ff-64d4-6aff2e9ec015@arm.com>

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-01-22 14:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22 11:52 [PATCH 0/3] iommu/arm-smmu-v3: TLB invalidation for SVA Jean-Philippe Brucker
2021-01-22 11:52 ` Jean-Philippe Brucker
2021-01-22 11:52 ` [PATCH 1/3] iommu/arm-smmu-v3: Split arm_smmu_tlb_inv_range() Jean-Philippe Brucker
2021-01-22 11:52   ` Jean-Philippe Brucker
2021-01-22 13:49   ` Will Deacon
2021-01-22 13:49     ` Will Deacon
2021-01-22 13:56   ` Robin Murphy
2021-01-22 13:56     ` Robin Murphy
2021-01-22 11:52 ` [PATCH 2/3] iommu/arm-smmu-v3: Make BTM optional for SVA Jean-Philippe Brucker
2021-01-22 11:52   ` Jean-Philippe Brucker
2021-01-22 14:04   ` Robin Murphy
2021-01-22 14:04     ` Robin Murphy
2021-01-22 14:13     ` Jean-Philippe Brucker [this message]
2021-01-22 14:13       ` Jean-Philippe Brucker
2021-01-22 11:52 ` [PATCH 3/3] iommu/arm-smmu-v3: Add support for VHE Jean-Philippe Brucker
2021-01-22 11:52   ` Jean-Philippe Brucker
2021-01-22 13:29 ` [PATCH 0/3] iommu/arm-smmu-v3: TLB invalidation for SVA Jonathan Cameron
2021-01-22 13:29   ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YArdhKeLJ0w6nHCS@myrica \
    --to=jean-philippe@linaro.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=robin.murphy@arm.com \
    --cc=vivek.gautam@arm.com \
    --cc=will@kernel.org \
    --cc=zhangfei.gao@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.