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

Commit 3b9bdf19 authored by Liam Mark's avatar Liam Mark Committed by Patrick Daly
Browse files

arm: dma-mapping: handle IOVA address zero



The IOVA allocator used by these calls supports IOVA address
zero so properly handle IOVA address zero.

Change-Id: I012452d4cf3534dfb79e6deb15b7ff74f5e3bb40
Signed-off-by: default avatarLiam Mark <lmark@codeaurora.org>
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent d35ec7cd
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -1783,9 +1783,6 @@ static void arm_iommu_unmap_page(struct device *dev, dma_addr_t handle,
	int offset = handle & ~PAGE_MASK;
	int len = PAGE_ALIGN(size + offset);

	if (!iova)
		return;

	if (!(is_device_dma_coherent(dev) ||
	      (attrs & DMA_ATTR_SKIP_CPU_SYNC)))
		__dma_page_dev_to_cpu(page, offset, size, dir);
@@ -1803,9 +1800,6 @@ static void arm_iommu_sync_single_for_cpu(struct device *dev,
						mapping->domain, iova));
	unsigned int offset = handle & ~PAGE_MASK;

	if (!iova)
		return;

	if (!is_device_dma_coherent(dev))
		__dma_page_dev_to_cpu(page, offset, size, dir);
}
@@ -1819,9 +1813,6 @@ static void arm_iommu_sync_single_for_device(struct device *dev,
						mapping->domain, iova));
	unsigned int offset = handle & ~PAGE_MASK;

	if (!iova)
		return;

	if (!is_device_dma_coherent(dev))
		__dma_page_cpu_to_dev(page, offset, size, dir);
}