diff options
Diffstat (limited to 'drivers/pci/intel-iommu.c')
-rw-r--r-- | drivers/pci/intel-iommu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 11b317a78b49..af7ff9b5aed8 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -2551,6 +2551,7 @@ static dma_addr_t __intel_map_single(struct device *hwdev, phys_addr_t paddr, | |||
2551 | int prot = 0; | 2551 | int prot = 0; |
2552 | int ret; | 2552 | int ret; |
2553 | struct intel_iommu *iommu; | 2553 | struct intel_iommu *iommu; |
2554 | unsigned long paddr_pfn = paddr >> PAGE_SHIFT; | ||
2554 | 2555 | ||
2555 | BUG_ON(dir == DMA_NONE); | 2556 | BUG_ON(dir == DMA_NONE); |
2556 | 2557 | ||
@@ -2585,7 +2586,7 @@ static dma_addr_t __intel_map_single(struct device *hwdev, phys_addr_t paddr, | |||
2585 | * is not a big problem | 2586 | * is not a big problem |
2586 | */ | 2587 | */ |
2587 | ret = domain_pfn_mapping(domain, mm_to_dma_pfn(iova->pfn_lo), | 2588 | ret = domain_pfn_mapping(domain, mm_to_dma_pfn(iova->pfn_lo), |
2588 | paddr >> VTD_PAGE_SHIFT, size, prot); | 2589 | mm_to_dma_pfn(paddr_pfn), size, prot); |
2589 | if (ret) | 2590 | if (ret) |
2590 | goto error; | 2591 | goto error; |
2591 | 2592 | ||