dma-mapping: remove arch_dma_mmap_pgprot
authorChristoph Hellwig <hch@lst.de>
Mon, 26 Aug 2019 07:03:44 +0000 (09:03 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 29 Aug 2019 14:43:22 +0000 (16:43 +0200)
commit419e2f1838819e954071dfa1d1f820ab3386ada1
tree5ef040344115ef0a0bbf30461668f5d831fecf2e
parentb898e50f9f49f7d90f3bca94ac046145072034a2
dma-mapping: remove arch_dma_mmap_pgprot

arch_dma_mmap_pgprot is used for two things:

 1) to override the "normal" uncached page attributes for mapping
    memory coherent to devices that can't snoop the CPU caches
 2) to provide the special DMA_ATTR_WRITE_COMBINE semantics on older
    arm systems and some mips platforms

Replace one with the pgprot_dmacoherent macro that is already provided
by arm and much simpler to use, and lift the DMA_ATTR_WRITE_COMBINE
handling to common code with an explicit arch opt-in.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> # m68k
Acked-by: Paul Burton <paul.burton@mips.com> # mips
13 files changed:
arch/arm/Kconfig
arch/arm/mm/dma-mapping.c
arch/arm64/Kconfig
arch/arm64/include/asm/pgtable.h
arch/arm64/mm/dma-mapping.c
arch/m68k/Kconfig
arch/m68k/include/asm/pgtable_mm.h
arch/m68k/kernel/dma.c
arch/mips/Kconfig
arch/mips/mm/dma-noncoherent.c
include/linux/dma-noncoherent.h
kernel/dma/Kconfig
kernel/dma/mapping.c