Skip to content

Commit 971573c

Browse files
committed
ARC: dma: pass_phys() not sg_virt() to cache ops
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
1 parent 6b70039 commit 971573c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎arch/arc/mm/dma.c‎

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

172172
for_each_sg(sglist, sg, nelems, i)
173-
_dma_cache_sync((unsigned int)sg_virt(sg), sg->length, dir);
173+
_dma_cache_sync(sg_phys(sg), sg->length, dir);
174174
}
175175

176176
static void arc_dma_sync_sg_for_device(struct device *dev,
@@ -181,7 +181,7 @@ static void arc_dma_sync_sg_for_device(struct device *dev,
181181
struct scatterlist *sg;
182182

183183
for_each_sg(sglist, sg, nelems, i)
184-
_dma_cache_sync((unsigned int)sg_virt(sg), sg->length, dir);
184+
_dma_cache_sync(sg_phys(sg), sg->length, dir);
185185
}
186186

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

0 commit comments

Comments
 (0)