MIPS: make dma_sync_*_for_cpu a little less overzealous
authorChristoph Hellwig <hch@lst.de>
Tue, 18 Aug 2020 13:18:23 +0000 (15:18 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 11 Sep 2020 06:13:49 +0000 (08:13 +0200)
commitcbf1449ba5aec9cf4c68b69f899391a8d42e9b8f
tree4fef104dc1a79294bc1a731c785d1da9da482c16
parentec91ccb27408abd842faf6137b3a0df8d6ebbdbb
MIPS: make dma_sync_*_for_cpu a little less overzealous

When transferring DMA ownership back to the CPU there should never
be any writeback from the cache, as the buffer was owned by the
device until now.  Instead it should just be invalidated for the
mapping directions where the device could have written data.
Note that the changes rely on the fact that kmap_atomic is stubbed
out for the !HIGHMEM case to simplify the code a bit.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/mm/dma-noncoherent.c