diff options
-rw-r--r-- | drivers/pci/intel-iommu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 02223e2e27d4..2bbc3fc88dc9 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -2640,7 +2640,8 @@ static void intel_unmap_page(struct device *dev, dma_addr_t dev_addr, | |||
2640 | iommu = domain_get_iommu(domain); | 2640 | iommu = domain_get_iommu(domain); |
2641 | 2641 | ||
2642 | iova = find_iova(&domain->iovad, IOVA_PFN(dev_addr)); | 2642 | iova = find_iova(&domain->iovad, IOVA_PFN(dev_addr)); |
2643 | if (!iova) | 2643 | if (WARN_ONCE(!iova, "Driver unmaps unmatched page at PFN %llx\n", |
2644 | (unsigned long long)dev_addr)) | ||
2644 | return; | 2645 | return; |
2645 | 2646 | ||
2646 | start_pfn = mm_to_dma_pfn(iova->pfn_lo); | 2647 | start_pfn = mm_to_dma_pfn(iova->pfn_lo); |
@@ -2730,7 +2731,8 @@ static void intel_unmap_sg(struct device *hwdev, struct scatterlist *sglist, | |||
2730 | iommu = domain_get_iommu(domain); | 2731 | iommu = domain_get_iommu(domain); |
2731 | 2732 | ||
2732 | iova = find_iova(&domain->iovad, IOVA_PFN(sglist[0].dma_address)); | 2733 | iova = find_iova(&domain->iovad, IOVA_PFN(sglist[0].dma_address)); |
2733 | if (!iova) | 2734 | if (WARN_ONCE(!iova, "Driver unmaps unmatched sglist at PFN %llx\n", |
2735 | (unsigned long long)sglist[0].dma_address)) | ||
2734 | return; | 2736 | return; |
2735 | 2737 | ||
2736 | start_pfn = mm_to_dma_pfn(iova->pfn_lo); | 2738 | start_pfn = mm_to_dma_pfn(iova->pfn_lo); |