iommu/vt-d: Drop duplicate check in dma_pte_free_pagetable()
authorKefeng Wang <wangkefeng.wang@huawei.com>
Fri, 17 Dec 2021 08:38:15 +0000 (16:38 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 17 Dec 2021 08:40:29 +0000 (09:40 +0100)
The BUG_ON check exists in dma_pte_clear_range(), kill the duplicate
check.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Link: https://lore.kernel.org/r/20211025032307.182974-1-wangkefeng.wang@huawei.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20211217083817.1745419-3-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/iommu.c

index 16e5fe35b3dc53ecfb825e88891d9ea402381b6e..261d931ee76ee8990d667018d44ef57323003c08 100644 (file)
@@ -1280,10 +1280,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 */