public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iommu: Remove duplicate check of pasids
@ 2021-04-01 11:19 Qi Liu
  2021-04-07  8:47 ` Joerg Roedel
  0 siblings, 1 reply; 2+ messages in thread
From: Qi Liu @ 2021-04-01 11:19 UTC (permalink / raw)
  To: will, joro; +Cc: linux-kernel, linuxarm

Remove duplicate check of pasids in amd_iommu_domain_enable_v2(), as it
has been guaranteed in amd_iommu_init_device().

Signed-off-by: Qi Liu <liuqi115@huawei.com>
---
 drivers/iommu/amd/iommu.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
index 107316e..7ca9f2f 100644
--- a/drivers/iommu/amd/iommu.c
+++ b/drivers/iommu/amd/iommu.c
@@ -2310,9 +2310,6 @@ int amd_iommu_domain_enable_v2(struct iommu_domain *dom, int pasids)
 	unsigned long flags;
 	int levels, ret;
 
-	if (pasids <= 0 || pasids > (PASID_MASK + 1))
-		return -EINVAL;
-
 	/* Number of GCR3 table levels required */
 	for (levels = 0; (pasids - 1) & ~0x1ff; pasids >>= 9)
 		levels += 1;
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iommu: Remove duplicate check of pasids
  2021-04-01 11:19 [PATCH] iommu: Remove duplicate check of pasids Qi Liu
@ 2021-04-07  8:47 ` Joerg Roedel
  0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2021-04-07  8:47 UTC (permalink / raw)
  To: Qi Liu; +Cc: will, linux-kernel, linuxarm

On Thu, Apr 01, 2021 at 07:19:16PM +0800, Qi Liu wrote:
> Remove duplicate check of pasids in amd_iommu_domain_enable_v2(), as it
> has been guaranteed in amd_iommu_init_device().
> 
> Signed-off-by: Qi Liu <liuqi115@huawei.com>
> ---
>  drivers/iommu/amd/iommu.c | 3 ---
>  1 file changed, 3 deletions(-)

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-07  8:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-01 11:19 [PATCH] iommu: Remove duplicate check of pasids Qi Liu
2021-04-07  8:47 ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox