diff options
author | Christoph Hellwig <hch@lst.de> | 2018-05-18 15:16:45 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-05-19 08:46:12 +0200 |
commit | b591741072271f3a7cbf5b976e64ffbfa9a7ce8c (patch) | |
tree | 5aeb46291b7c74b432519384f88d95a18f03eb7b /arch/arc/mm | |
parent | arc: simplify arc_dma_sync_single_for_{cpu,device} (diff) | |
download | linux-b591741072271f3a7cbf5b976e64ffbfa9a7ce8c.tar.xz linux-b591741072271f3a7cbf5b976e64ffbfa9a7ce8c.zip |
arc: fix arc_dma_sync_sg_for_{cpu,device}
These functions should perform the same functionality as calling
arc_dma_sync_single_for_{cpu,device} on each S/G list element. Ensure
they actually do that by calling arc_dma_sync_single_for_{cpu,device}.
Otherwise we could be passing a different dir argument.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Alexey Brodkin <abrodkin@synopsys.com>
Acked-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/mm')
-rw-r--r-- | arch/arc/mm/dma.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arc/mm/dma.c b/arch/arc/mm/dma.c index 98e21ce526be..eafdbd2ad20a 100644 --- a/arch/arc/mm/dma.c +++ b/arch/arc/mm/dma.c @@ -241,7 +241,7 @@ static void arc_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg; for_each_sg(sglist, sg, nelems, i) - _dma_cache_sync(sg_phys(sg), sg->length, dir); + arc_dma_sync_single_for_cpu(dev, sg_phys(sg), sg->length, dir); } static void arc_dma_sync_sg_for_device(struct device *dev, @@ -252,7 +252,8 @@ static void arc_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg; for_each_sg(sglist, sg, nelems, i) - _dma_cache_sync(sg_phys(sg), sg->length, dir); + arc_dma_sync_single_for_device(dev, sg_phys(sg), sg->length, + dir); } static int arc_dma_supported(struct device *dev, u64 dma_mask) |