diff options
author | Christoph Hellwig <hch@lst.de> | 2019-08-26 03:03:44 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2019-08-29 10:43:22 -0400 |
commit | 419e2f1838819e954071dfa1d1f820ab3386ada1 (patch) | |
tree | 5ef040344115ef0a0bbf30461668f5d831fecf2e /arch/arm | |
parent | b898e50f9f49f7d90f3bca94ac046145072034a2 (diff) |
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
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/mm/dma-mapping.c | 6 |
2 files changed, 1 insertions, 7 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 24360211534a..217083caeabd 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -8,7 +8,7 @@ config ARM | |||
8 | select ARCH_HAS_DEBUG_VIRTUAL if MMU | 8 | select ARCH_HAS_DEBUG_VIRTUAL if MMU |
9 | select ARCH_HAS_DEVMEM_IS_ALLOWED | 9 | select ARCH_HAS_DEVMEM_IS_ALLOWED |
10 | select ARCH_HAS_DMA_COHERENT_TO_PFN if SWIOTLB | 10 | select ARCH_HAS_DMA_COHERENT_TO_PFN if SWIOTLB |
11 | select ARCH_HAS_DMA_MMAP_PGPROT if SWIOTLB | 11 | select ARCH_HAS_DMA_WRITE_COMBINE if !ARM_DMA_MEM_BUFFERABLE |
12 | select ARCH_HAS_ELF_RANDOMIZE | 12 | select ARCH_HAS_ELF_RANDOMIZE |
13 | select ARCH_HAS_FORTIFY_SOURCE | 13 | select ARCH_HAS_FORTIFY_SOURCE |
14 | select ARCH_HAS_KEEPINITRD | 14 | select ARCH_HAS_KEEPINITRD |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index d42557ee69c2..d27b12f61737 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -2402,12 +2402,6 @@ long arch_dma_coherent_to_pfn(struct device *dev, void *cpu_addr, | |||
2402 | return dma_to_pfn(dev, dma_addr); | 2402 | return dma_to_pfn(dev, dma_addr); |
2403 | } | 2403 | } |
2404 | 2404 | ||
2405 | pgprot_t arch_dma_mmap_pgprot(struct device *dev, pgprot_t prot, | ||
2406 | unsigned long attrs) | ||
2407 | { | ||
2408 | return __get_dma_pgprot(attrs, prot); | ||
2409 | } | ||
2410 | |||
2411 | void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, | 2405 | void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, |
2412 | gfp_t gfp, unsigned long attrs) | 2406 | gfp_t gfp, unsigned long attrs) |
2413 | { | 2407 | { |