Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c681d0ba authored by Mike Travis's avatar Mike Travis Committed by David Woodhouse
Browse files

intel-iommu: Use coherent DMA mask when requested



The __intel_map_single function is not honoring the passed in DMA mask.
This results in not using the coherent DMA mask when called from
intel_alloc_coherent().

Signed-off-by: default avatarMike Travis <travis@sgi.com>
Acked-by: default avatarChris Wright <chrisw@sous-sol.org>
Reviewed-by: default avatarMike Habeck <habeck@sgi.com>
Cc: stable@kernel.org
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 1c9fc3d1
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -2732,8 +2732,7 @@ static dma_addr_t __intel_map_single(struct device *hwdev, phys_addr_t paddr,
	iommu = domain_get_iommu(domain);
	iommu = domain_get_iommu(domain);
	size = aligned_nrpages(paddr, size);
	size = aligned_nrpages(paddr, size);


	iova = intel_alloc_iova(hwdev, domain, dma_to_mm_pfn(size),
	iova = intel_alloc_iova(hwdev, domain, dma_to_mm_pfn(size), dma_mask);
				pdev->dma_mask);
	if (!iova)
	if (!iova)
		goto error;
		goto error;