Skip to contentSkip to conversation

iommu/vt-d: Drop duplicate check in dma_pte_free_pagetable()

PATCH New Kefeng Wang 1 participant 1 message Oct 25, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/vt-d: Drop duplicate check in dma_pte_free_pagetable()

The BUG_ON check exists in dma_pte_clear_range(), kill the duplicate check.

---
 drivers/iommu/intel/iommu.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/iommu/intel/iommu.c +0 -4
index d75f59ae28e6..ea2eec87a1ea 100644
@@ -1163,10 +1163,6 @@ static void dma_pte_free_pagetable(struct dmar_domain *domain,
 				   unsigned long last_pfn,
 				   int retain_level)
 {
-	BUG_ON(!domain_pfn_supported(domain, start_pfn));
-	BUG_ON(!domain_pfn_supported(domain, last_pfn));
-	BUG_ON(start_pfn > last_pfn);
-
 	dma_pte_clear_range(domain, start_pfn, last_pfn);
 
 	/* We don't need lock here; nobody else touches the iova range */
Signature · 6 lines
2.26.2

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu