riscv: Add support for non-coherent devices using zicbom extension
The Zicbom ISA-extension was ratified in november 2021 and introduces instructions for dcache invalidate, clean and flush operations. Implement cache management operations for non-coherent devices based on them. Of course not all cores will support this, so implement an alternative-based mechanism that replaces empty instructions with ones done around Zicbom instructions. As discussed in previous versions, assume the platform being coherent by default so that non-coherent devices need to get marked accordingly by firmware. Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NHeiko Stuebner <heiko@sntech.de> Reviewed-by: NGuo Ren <guoren@kernel.org> Link: https://lore.kernel.org/r/20220706231536.2041855-4-heiko@sntech.deSigned-off-by: NPalmer Dabbelt <palmer@rivosinc.com>
Showing
arch/riscv/mm/dma-noncoherent.c
0 → 100644
想要评论请 注册 或 登录