diff options
author | Christoph Hellwig <hch@lst.de> | 2018-09-11 08:55:28 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-09-20 09:01:16 +0200 |
commit | 58b0440663ec11372befb8ead0ee7099d8878590 (patch) | |
tree | c613ed22ad229e6612d8c71888d2bb8139163ea8 /kernel/dma/Kconfig | |
parent | bc3ec75de5452db59b683487867ba562b950708a (diff) | |
download | linux-58b0440663ec11372befb8ead0ee7099d8878590.tar.bz2 |
dma-mapping: consolidate the dma mmap implementations
The only functional differences (modulo a few missing fixes in the arch
code) is that architectures without coherent caches need a hook to
convert a virtual or dma address into a pfn, given that we don't have
the kernel linear mapping available for the otherwise easy virt_to_page
call. As a side effect we can support mmap of the per-device coherent
area even on architectures not providing the callback, and we make
previous dangerous default methods dma_common_mmap actually save for
non-coherent architectures by rejecting it without the right helper.
In addition to that we need a hook so that some architectures can
override the protection bits when mmaping a dma coherent allocations.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Paul Burton <paul.burton@mips.com> # MIPS parts
Diffstat (limited to 'kernel/dma/Kconfig')
-rw-r--r-- | kernel/dma/Kconfig | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/dma/Kconfig b/kernel/dma/Kconfig index 5617c9a76208..645c7a2ecde8 100644 --- a/kernel/dma/Kconfig +++ b/kernel/dma/Kconfig @@ -29,13 +29,15 @@ config ARCH_HAS_SYNC_DMA_FOR_CPU config ARCH_HAS_SYNC_DMA_FOR_CPU_ALL bool -config DMA_DIRECT_OPS +config ARCH_HAS_DMA_COHERENT_TO_PFN bool - depends on HAS_DMA -config DMA_NONCOHERENT_MMAP +config ARCH_HAS_DMA_MMAP_PGPROT bool - depends on DMA_DIRECT_OPS + +config DMA_DIRECT_OPS + bool + depends on HAS_DMA config DMA_NONCOHERENT_CACHE_SYNC bool |