Thread (75 messages) 75 messages, 21 authors, 2023-07-06

Re: [PATCH 09/21] riscv: dma-mapping: skip invalidation before bidirectional DMA

From: Conor Dooley <conor@kernel.org>
Date: 2023-03-29 20:16:28
Also in: linux-arm-kernel, linux-m68k, linux-mips, linux-riscv, linux-sh, lkml, sparclinux

On Mon, Mar 27, 2023 at 02:13:05PM +0200, Arnd Bergmann wrote:
From: Arnd Bergmann <arnd@arndb.de>

For a DMA_BIDIRECTIONAL transfer, the caches have to be cleaned
first to let the device see data written by the CPU, and invalidated
after the transfer to let the CPU see data written by the device.

riscv also invalidates the caches before the transfer, which does
not appear to serve any purpose.
Rationale makes sense to me..
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Thanks for working on all of this Arnd!

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help