Skip to content

Commit 998d4c2

Browse files
TinaZhangZWjoergroedel
authored andcommitted
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>
1 parent 4a627a2 commit 998d4c2

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

drivers/iommu/intel/iommu.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -915,8 +915,6 @@ static struct dma_pte *pfn_to_dma_pte(struct dmar_domain *domain,
915915
int level = agaw_to_level(domain->agaw);
916916
int offset;
917917

918-
BUG_ON(!domain->pgd);
919-
920918
if (!domain_pfn_supported(domain, pfn))
921919
/* Address beyond IOMMU's addressing capabilities. */
922920
return NULL;
@@ -1910,8 +1908,6 @@ static int domain_context_mapping_one(struct dmar_domain *domain,
19101908
pr_debug("Set context mapping for %02x:%02x.%d\n",
19111909
bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
19121910

1913-
BUG_ON(!domain->pgd);
1914-
19151911
spin_lock(&iommu->lock);
19161912
ret = -ENOMEM;
19171913
context = iommu_context_addr(iommu, bus, devfn, 1);

0 commit comments

Comments
 (0)