summaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-06-19 09:04:54 +0200
committerHelge Deller <deller@gmx.de>2018-08-13 09:30:23 +0200
commit7f1501053811414ddeff63db8f5d41bdbe38068f (patch)
tree8a14a4695f1188d7dc545c7290a5e9ba63ab8645 /arch/parisc/kernel
parenta34a9b9682a5a9de53386ed0872c7d38ca9d6b38 (diff)
downloadlinux-7f1501053811414ddeff63db8f5d41bdbe38068f.tar.bz2
parisc: always use flush_kernel_dcache_range for DMA cache maintainance
Current the S/G list based DMA ops use flush_kernel_vmap_range which contains a few UP optimizations, while the rest of the DMA operations uses flush_kernel_dcache_range. The single vs sg operations are supposed to have the same effect, so they should use the same routines. Use the more conservation version for now, but if people more familiar with parisc think the vmap version is generally fine for DMA we should switch all interfaces over to it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/kernel')
-rw-r--r--arch/parisc/kernel/pci-dma.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c
index d34cd6d34717..1f85ca2c0c9e 100644
--- a/arch/parisc/kernel/pci-dma.c
+++ b/arch/parisc/kernel/pci-dma.c
@@ -537,7 +537,7 @@ static void pa11_dma_unmap_sg(struct device *dev, struct scatterlist *sglist,
/* once we do combining we'll need to use phys_to_virt(sg_dma_address(sglist)) */
for_each_sg(sglist, sg, nents, i)
- flush_kernel_vmap_range(sg_virt(sg), sg->length);
+ flush_kernel_dcache_range(sg_virt(sg), sg->length);
}
static void pa11_dma_sync_single_for_cpu(struct device *dev,
@@ -568,7 +568,7 @@ static void pa11_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sgl
/* once we do combining we'll need to use phys_to_virt(sg_dma_address(sglist)) */
for_each_sg(sglist, sg, nents, i)
- flush_kernel_vmap_range(sg_virt(sg), sg->length);
+ flush_kernel_dcache_range(sg_virt(sg), sg->length);
}
static void pa11_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction direction)
@@ -579,7 +579,7 @@ static void pa11_dma_sync_sg_for_device(struct device *dev, struct scatterlist *
/* once we do combining we'll need to use phys_to_virt(sg_dma_address(sglist)) */
for_each_sg(sglist, sg, nents, i)
- flush_kernel_vmap_range(sg_virt(sg), sg->length);
+ flush_kernel_dcache_range(sg_virt(sg), sg->length);
}
static void pa11_dma_cache_sync(struct device *dev, void *vaddr, size_t size,