e3364c5c3c68 [COMMON] iommu/exynos: set sharable mapping for dma coherent device
6d648acaeb84 [COMMON] ion: set sharable mapping for dma coherent device
The iovmm mapping of dma coherent device is always
treated sharable mapping on exynos for cachable
memory.
Change-Id: I7b770f90f2a6cb3af8c6ef987109a33b747325a3
Signed-off-by: hyesoo.yu <hyesoo.yu@samsung.com>
int ret = -EINVAL;
int prot = IOMMU_READ;
- if (device_get_dma_attr(dev) == DEV_DMA_COHERENT)
- prot |= IOMMU_CACHE;
-
if (!IS_HWFC(task->flags) || (dir == DMA_TO_DEVICE)) {
dmabuf = dma_buf_get(data->dmabuf.fd);
if (IS_ERR(dmabuf)) {
if (dir != DMA_TO_DEVICE)
prot |= IOMMU_WRITE;
- if (is_vma_cached(vma)) {
+ if (is_vma_cached(vma))
task->total_cached_len += buffer->payload;
- if (device_get_dma_attr(dev) == DEV_DMA_COHERENT)
- prot |= IOMMU_CACHE;
- }
-
buffer->userptr.vma = tvma;
tvma->vm_next = NULL;