linux_dsm_epyc7002/arch/arc/mm
Alexey Brodkin a79a812131 arc: Implement arch-specific dma_map_ops.mmap
We used to use generic implementation of dma_map_ops.mmap which is
dma_common_mmap() but that only worked for simpler cached mappings when
vaddr = paddr.

If a driver requests uncached DMA buffer kernel maps it to virtual
address so that MMU gets involved and page uncached status takes into
account. In that case usage of dma_common_mmap() lead to mapping of
vaddr to vaddr for user-space which is obviously wrong. For more detals
please refer to verbose explanation here [1].

So here we implement our own version of mmap() which always deals
with dma_addr and maps underlying memory to user-space properly
(note that DMA buffer mapped to user-space is always uncached
because there's no way to properly manage cache from user-space).

[1] https://lkml.org/lkml/2016/10/26/973

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: <stable@vger.kernel.org>  #4.5+
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2016-11-03 10:01:07 -07:00
..
cache.c ARCv2: boot log: print IOC exists as well as enabled status 2016-10-28 10:06:48 -07:00
dma.c arc: Implement arch-specific dma_map_ops.mmap 2016-11-03 10:01:07 -07:00
extable.c ARC: Fix coding style issues 2013-04-09 12:21:14 +05:30
fault.c mm: do not pass mm_struct into handle_mm_fault 2016-07-26 16:19:19 -07:00
highmem.c ARC: export kmap 2016-08-19 10:45:29 -07:00
init.c treewide: replace obsolete _refok by __ref 2016-08-02 17:31:41 -04:00
ioremap.c ARCv2: Support dynamic peripheral address space in HS38 rel 3.0 cores 2016-09-30 14:48:17 -07:00
Makefile ARC: mm: HIGHMEM: kmap API implementation 2015-10-28 19:49:04 +05:30
mmap.c ARC: [mm] Aliasing VIPT dcache support 4/4 2013-05-09 22:00:57 +05:30
tlb.c ARC: boot log: remove awkward space comma from MMU line 2016-10-28 10:09:06 -07:00
tlbex.S ARC: mm: retire ARC_DBG_TLB_MISS_COUNT... 2016-10-28 10:10:28 -07:00