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 6d732e4..e9dd88b 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 1d7125d..ad290f7 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 fa4df65..ed50502 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,
 };