Skip to contentSkip to conversation

iommu: Remove duplicate check of pasids

PATCH Applied Qi Liu 2 participants 2 messages Apr 1, 2021 – Apr 7, 2021

Subsystems (2)
lore
Share & tools
lore

Qi Liu

author
#0 lore raw

PATCH 1/1 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().

---
 drivers/iommu/amd/iommu.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/iommu/amd/iommu.c +0 -3
index 107316e..7ca9f2f 100644
@@ -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;
Signature · 1 line
2.8.1
maintainer Applied
#1 lore raw
Quoted 7 lines · Qi Liu

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

---
 drivers/iommu/amd/iommu.c | 3 ---
 1 file changed, 3 deletions(-)

Applied, thanks.