arc: fix arc_dma_{map,unmap}_page
authorChristoph Hellwig <hch@lst.de>
Fri, 18 May 2018 13:24:13 +0000 (15:24 +0200)
committerChristoph Hellwig <hch@lst.de>
Sat, 19 May 2018 06:46:12 +0000 (08:46 +0200)
commita8eb92d02dd7ffc7f04c48da3f2f80dbb6c74e5e
treee00686eca5c0cd67d67fbf91caded50d7e678c5c
parentb591741072271f3a7cbf5b976e64ffbfa9a7ce8c
arc: fix arc_dma_{map,unmap}_page

These functions should perform the same cache synchronoization as calling
arc_dma_sync_single_for_{cpu,device} in addition to doing any required
address translation or mapping [1].  Ensure they actually do that by calling
arc_dma_sync_single_for_{cpu,device} instead of passing the dir argument
along to _dma_cache_sync.

The now unused _dma_cache_sync function is removed as well.

[1] in fact various drivers rely on that by passing DMA_ATTR_SKIP_CPU_SYNC
to the map/unmap routines and doing the cache synchronization manually.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Alexey Brodkin <abrodkin@synopsys.com>
Acked-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/mm/dma.c