Skip to content

Commit b591741

Browse files
author
Christoph Hellwig
committed
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>
1 parent 713a746 commit b591741

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎arch/arc/mm/dma.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ static void arc_dma_sync_sg_for_cpu(struct device *dev,
241241
struct scatterlist *sg;
242242

243243
for_each_sg(sglist, sg, nelems, i)
244-
_dma_cache_sync(sg_phys(sg), sg->length, dir);
244+
arc_dma_sync_single_for_cpu(dev, sg_phys(sg), sg->length, dir);
245245
}
246246

247247
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,
252252
struct scatterlist *sg;
253253

254254
for_each_sg(sglist, sg, nelems, i)
255-
_dma_cache_sync(sg_phys(sg), sg->length, dir);
255+
arc_dma_sync_single_for_device(dev, sg_phys(sg), sg->length,
256+
dir);
256257
}
257258

258259
static int arc_dma_supported(struct device *dev, u64 dma_mask)

0 commit comments

Comments
 (0)