Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Benjamin Gaignard and committed by
Russell King
79964a1c 00a19f3e

+3
+3
arch/arm/mm/dma-mapping.c
··· 868 868 vma->vm_end - vma->vm_start, 869 869 vma->vm_page_prot); 870 870 } 871 + #else 872 + ret = vm_iomap_memory(vma, vma->vm_start, 873 + (vma->vm_end - vma->vm_start)); 871 874 #endif /* CONFIG_MMU */ 872 875 873 876 return ret;