]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit - arch/mips/Kconfig
dma-mapping: consolidate the dma mmap implementations
authorChristoph Hellwig <hch@lst.de>
Tue, 11 Sep 2018 06:55:28 +0000 (08:55 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 20 Sep 2018 07:01:16 +0000 (09:01 +0200)
commit58b0440663ec11372befb8ead0ee7099d8878590
treec613ed22ad229e6612d8c71888d2bb8139163ea8
parentbc3ec75de5452db59b683487867ba562b950708a
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
16 files changed:
arch/arc/Kconfig
arch/arc/mm/dma.c
arch/arm/mm/dma-mapping-nommu.c
arch/microblaze/Kconfig
arch/microblaze/include/asm/pgtable.h
arch/microblaze/kernel/dma.c
arch/microblaze/mm/consistent.c
arch/mips/Kconfig
arch/mips/jazz/jazzdma.c
arch/mips/mm/dma-noncoherent.c
drivers/xen/swiotlb-xen.c
include/linux/dma-mapping.h
include/linux/dma-noncoherent.h
kernel/dma/Kconfig
kernel/dma/direct.c
kernel/dma/mapping.c