From: hyesoo.yu Date: Sun, 3 Jun 2018 08:20:45 +0000 (+0900) Subject: [COMMON] iommu/exynos: set sharable mapping for dma coherent device X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=255cb7c217052a6bfa74d37f64d80e535a6e73c0;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] iommu/exynos: set sharable mapping for dma coherent device Change-Id: I9036ff34b860eb9bd698a4e8a938fca5d3dabb4e Signed-off-by: hyesoo.yu --- 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)) {