diff options
author | Tina Zhang <tina.zhang@intel.com> | 2023-04-13 06:06:42 +0200 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2023-04-13 12:05:52 +0200 |
commit | 998d4c2db30c7279ce6070faf06b914c98f2ae30 (patch) | |
tree | 3bd3675b7b9ad6941f65c86cf63491192b6a7a17 /drivers/iommu | |
parent | iommu/vt-d: Remove BUG_ON in handling iotlb cache invalidation (diff) | |
download | linux-998d4c2db30c7279ce6070faf06b914c98f2ae30.tar.xz linux-998d4c2db30c7279ce6070faf06b914c98f2ae30.zip |
iommu/vt-d: Remove BUG_ON when domain->pgd is NULL
When performing domain_context_mapping or getting dma_pte of a pfn, the
availability of the domain page table directory is ensured. Therefore,
the domain->pgd checkings are unnecessary.
Signed-off-by: Tina Zhang <tina.zhang@intel.com>
Link: https://lore.kernel.org/r/20230406065944.2773296-5-tina.zhang@intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/intel/iommu.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index dd61bb554aa7..f11347a590d7 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -915,8 +915,6 @@ static struct dma_pte *pfn_to_dma_pte(struct dmar_domain *domain, int level = agaw_to_level(domain->agaw); int offset; - BUG_ON(!domain->pgd); - if (!domain_pfn_supported(domain, pfn)) /* Address beyond IOMMU's addressing capabilities. */ return NULL; @@ -1910,8 +1908,6 @@ static int domain_context_mapping_one(struct dmar_domain *domain, pr_debug("Set context mapping for %02x:%02x.%d\n", bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); - BUG_ON(!domain->pgd); - spin_lock(&iommu->lock); ret = -ENOMEM; context = iommu_context_addr(iommu, bus, devfn, 1); |