parisc: don't set ARCH_NO_COHERENT_DMA_MMAP
authorChristoph Hellwig <hch@lst.de>
Tue, 6 Aug 2019 11:12:37 +0000 (14:12 +0300)
committerChristoph Hellwig <hch@lst.de>
Wed, 4 Sep 2019 09:13:18 +0000 (11:13 +0200)
parisc is the only architecture that sets ARCH_NO_COHERENT_DMA_MMAP
when an MMU is enabled.  AFAIK this is because parisc CPUs use VIVT
caches, which means exporting normally cachable memory to userspace is
relatively dangrous due to cache aliasing.

But normally cachable memory is only allocated by dma_alloc_coherent
on parisc when using the sba_iommu or ccio_iommu drivers, so just
remove the .mmap implementation for them so that we don't have to set
ARCH_NO_COHERENT_DMA_MMAP, which I plan to get rid of.

Signed-off-by: Christoph Hellwig <hch@lst.de>
arch/parisc/Kconfig
drivers/parisc/ccio-dma.c
drivers/parisc/sba_iommu.c

index 6d732e4510713391989914fa244f2798d37052be..e9dd88b7f81ec71784e6fb8f5e6fa97b3d20a37e 100644 (file)
@@ -52,7 +52,6 @@ config PARISC
        select GENERIC_SCHED_CLOCK
        select HAVE_UNSTABLE_SCHED_CLOCK if SMP
        select GENERIC_CLOCKEVENTS
-       select ARCH_NO_COHERENT_DMA_MMAP
        select CPU_NO_EFFICIENT_FFS
        select NEED_DMA_MAP_STATE
        select NEED_SG_DMA_LENGTH
index 1d7125d29beeb3ba710c6e4b192681f885f06017..ad290f79983b940fa4a49dfb479eb71eed681f87 100644 (file)
@@ -1024,7 +1024,6 @@ static const struct dma_map_ops ccio_ops = {
        .unmap_page =           ccio_unmap_page,
        .map_sg =               ccio_map_sg,
        .unmap_sg =             ccio_unmap_sg,
-       .mmap =                 dma_common_mmap,
        .get_sgtable =          dma_common_get_sgtable,
 };
 
index fa4df65b7e28ae644686b6b64f99c681a7790a1b..ed50502cc65ad29836f5aa47253a0e974ae22471 100644 (file)
@@ -1084,7 +1084,6 @@ static const struct dma_map_ops sba_ops = {
        .unmap_page =           sba_unmap_page,
        .map_sg =               sba_map_sg,
        .unmap_sg =             sba_unmap_sg,
-       .mmap =                 dma_common_mmap,
        .get_sgtable =          dma_common_get_sgtable,
 };