[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1617275956-4467-1-git-send-email-liuqi115@huawei.com>
Date: Thu, 1 Apr 2021 19:19:16 +0800
From: Qi Liu <liuqi115@...wei.com>
To: <will@...nel.org>, <joro@...tes.org>
CC: <linux-kernel@...r.kernel.org>, <linuxarm@...wei.com>
Subject: [PATCH] iommu: Remove duplicate check of pasids
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@...wei.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
Powered by blists - more mailing lists