From 255cb7c217052a6bfa74d37f64d80e535a6e73c0 Mon Sep 17 00:00:00 2001 From: "hyesoo.yu" Date: Sun, 3 Jun 2018 17:20:45 +0900 Subject: [PATCH] [COMMON] iommu/exynos: set sharable mapping for dma coherent device Change-Id: I9036ff34b860eb9bd698a4e8a938fca5d3dabb4e Signed-off-by: hyesoo.yu --- drivers/iommu/exynos-iovmm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/exynos-iovmm.c b/drivers/iommu/exynos-iovmm.c index 5fde22ac2788..e16cd7068fc9 100644 --- a/drivers/iommu/exynos-iovmm.c +++ b/drivers/iommu/exynos-iovmm.c @@ -533,6 +533,8 @@ dma_addr_t exynos_iovmm_map_userptr(struct device *dev, unsigned long vaddr, (pgprot_val(pgprot_noncached(vma->vm_page_prot)) == pgprot_val(vma->vm_page_prot))) prot &= ~IOMMU_CACHE; + else if (device_get_dma_attr(dev) == DEV_DMA_COHERENT) + prot |= IOMMU_CACHE; while (eaddr > vma->vm_end) { if (!!(vma->vm_flags & VM_PFNMAP)) { -- 2.20.1