The RISC-V architecture has cache-coherent DMA... until it doesn't. This
authorkettenis <kettenis@openbsd.org>
Sun, 7 Apr 2024 21:08:59 +0000 (21:08 +0000)
committerkettenis <kettenis@openbsd.org>
Sun, 7 Apr 2024 21:08:59 +0000 (21:08 +0000)
commit16c51e1a089c5661c8fd59ecd70bdd987735791f
tree38e74c06b138577633c1d6f64294904046576e86
parentc112ccd4e935368b3dbd25689ef303313e7b567e
The RISC-V architecture has cache-coherent DMA... until it doesn't.  This
is indicated by a "dma-noncoherent" property on the bus or device nodes
in the device tree.  Set the BUS_DMA_COHERENT flag on the DMA tag for
mainbus(4) and modify the flags based on the presence of "dma-coherent"
and "dma-noncoherent" properties where appropriate.

ok patrick@
sys/arch/riscv64/dev/mainbus.c
sys/arch/riscv64/dev/simplebus.c