powerpc/dma: properly wire up the unmap_page and unmap_sg methods
authorChristoph Hellwig <hch@lst.de>
Sun, 16 Dec 2018 17:19:45 +0000 (18:19 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 20 Dec 2018 11:21:20 +0000 (22:21 +1100)
commit0aeba2d0d27c7341c10aeae7f013ad5f034d8b2d
tree17371a63e7763b3431c35c33982dd8c0dcf82c17
parent9286356907caa2d4737bd9dd8afe0b4ccaeea02b
powerpc/dma: properly wire up the unmap_page and unmap_sg methods

The unmap methods need to transfer memory ownership back from the
device to the cpu by identical means as dma_sync_*_to_cpu. I'm not
sure powerpc needs to do any work in this transfer direction, but
given that it does invalidate the caches in dma_sync_*_to_cpu already
we should make sure we also do so on unmapping.

Signed-off-by: Christoph Hellwig <hch@lst.de>
[mpe: s/dir/direction in dma_nommu_unmap_page()]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/dma.c