Commit 56fa2ece authored by Jon Medhurst (Tixy)'s avatar Jon Medhurst (Tixy) Committed by Greg Kroah-Hartman
Browse files

staging: ion: ion_cma_heap: Don't directly use dma_common_get_sgtable



Use dma_get_sgtable rather than dma_common_get_sgtable so a device's
dma_ops aren't bypassed. This is essential in situations where a device
uses an IOMMU and the physical memory is not contiguous (as the common
function assumes).

Signed-off-by: default avatarJon Medhurst <tixy@linaro.org>
Reviewed-by: default avatarRobin Murphy <robin.murphy@arm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b2069165
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -73,8 +73,7 @@ static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer,
	if (!info->table)
		goto free_mem;

	if (dma_common_get_sgtable
	    (dev, info->table, info->cpu_addr, info->handle, len))
	if (dma_get_sgtable(dev, info->table, info->cpu_addr, info->handle, len))
		goto free_table;
	/* keep this for memory release */
	buffer->priv_virt = info;