[ARM] dma: don't touch cache on dma_*_for_cpu()
As per the dma_unmap_* calls, we don't touch the cache when a DMA buffer transitions from device to CPU ownership. Presently, no problems have been identified with speculative cache prefetching which in itself is a new feature in later architectures. We may have to revisit the DMA API later for these architectures anyway. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
committed by
Russell King
parent
0e18b5d7c6
commit
309dbbabee
@ -585,12 +585,8 @@ void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
|
||||
int i;
|
||||
|
||||
for_each_sg(sg, s, nents, i) {
|
||||
if (!dmabounce_sync_for_cpu(dev, sg_dma_address(s), 0,
|
||||
sg_dma_len(s), dir))
|
||||
continue;
|
||||
|
||||
if (!arch_is_coherent())
|
||||
dma_cache_maint(sg_virt(s), s->length, dir);
|
||||
dmabounce_sync_for_cpu(dev, sg_dma_address(s), 0,
|
||||
sg_dma_len(s), dir);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(dma_sync_sg_for_cpu);
|
||||
|
Reference in New Issue
Block a user