summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>2016-12-12 09:31:18 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2017-01-11 00:32:54 +0100
commit79964a1c2972ca7ecc231e2d2ac7593a1af73f63 (patch)
tree33800f7aaab3f6018a6b9e25d4fc12e282f633ad /arch/arm
parentARM: 8627/1: avoid cache flushing in flush_dcache_page() (diff)
downloadlinux-79964a1c2972ca7ecc231e2d2ac7593a1af73f63.tar.xz
linux-79964a1c2972ca7ecc231e2d2ac7593a1af73f63.zip
ARM: 8633/1: nommu: allow mmap when !CONFIG_MMU
commit ab6494f0c96f ("nommu: Add noMMU support to the DMA API") have add CONFIG_MMU compilation flag but that prohibit to use dma_mmap_wc() when the platform doesn't have MMU. This patch call vm_iomap_memory() in noMMU case to test if addresses are correct and set vma->vm_flags rather than all return an error. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mm/dma-mapping.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index ab7710002ba6..afa64ed5e36b 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -868,6 +868,9 @@ static int __arm_dma_mmap(struct device *dev, struct vm_area_struct *vma,
vma->vm_end - vma->vm_start,
vma->vm_page_prot);
}
+#else
+ ret = vm_iomap_memory(vma, vma->vm_start,
+ (vma->vm_end - vma->vm_start));
#endif /* CONFIG_MMU */
return ret;