riscv: split cache ops out of dma-noncoherent.c
authorChristoph Hellwig <hch@lst.de>
Sat, 28 Oct 2023 15:51:01 +0000 (17:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:19:49 +0000 (17:19 +0000)
commitb4ad5617278afd485bcfe3f402539b19d8b42000
tree3d1cf0396c386147d21e2e9da492cabc7b91ad7b
parent8ebe2d452fd0c7e6ac2583e3f41022f60e0f1fd1
riscv: split cache ops out of dma-noncoherent.c

[ Upstream commit 946bb33d330251966223f770f64885c79448b1a1 ]

The cache ops are also used by the pmem code which is unconditionally
built into the kernel.  Move them into a separate file that is built
based on the correct config option.

Fixes: fd962781270e ("riscv: RISCV_NONSTANDARD_CACHE_OPS shouldn't depend on RISCV_DMA_NONCOHERENT")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Tested-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> #
Link: https://lore.kernel.org/r/20231028155101.1039049-1-hch@lst.de
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/riscv/mm/Makefile
arch/riscv/mm/cache-ops.c [new file with mode: 0644]
arch/riscv/mm/dma-noncoherent.c