diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2016-03-16 05:21:33 -0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2016-03-19 05:04:09 -0400 |
commit | 971573cf57394775deb591c3920e565c80cbc800 (patch) | |
tree | 77057daf5c3bb0c9d135d86c4a1c074396b54115 | |
parent | 6b7003930e010eeb976632c1a374246b7cbc2995 (diff) |
ARC: dma: pass_phys() not sg_virt() to cache ops
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-rw-r--r-- | arch/arc/mm/dma.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arc/mm/dma.c b/arch/arc/mm/dma.c index 4b428a449300..d6b30f65d692 100644 --- a/arch/arc/mm/dma.c +++ b/arch/arc/mm/dma.c | |||
@@ -170,7 +170,7 @@ static void arc_dma_sync_sg_for_cpu(struct device *dev, | |||
170 | struct scatterlist *sg; | 170 | struct scatterlist *sg; |
171 | 171 | ||
172 | for_each_sg(sglist, sg, nelems, i) | 172 | 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); |
174 | } | 174 | } |
175 | 175 | ||
176 | static void arc_dma_sync_sg_for_device(struct device *dev, | 176 | 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, | |||
181 | struct scatterlist *sg; | 181 | struct scatterlist *sg; |
182 | 182 | ||
183 | for_each_sg(sglist, sg, nelems, i) | 183 | 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); |
185 | } | 185 | } |
186 | 186 | ||
187 | static int arc_dma_supported(struct device *dev, u64 dma_mask) | 187 | static int arc_dma_supported(struct device *dev, u64 dma_mask) |