mirror of
https://github.com/torvalds/linux.git
synced 2026-12-01 11:03:37 +00:00
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: fd96278127 ("riscv: RISCV_NONSTANDARD_CACHE_OPS shouldn't depend on RISCV_DMA_NONCOHERENT")
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Conor Dooley <[email protected]>
Tested-by: Conor Dooley <[email protected]>
Reviewed-by: Lad Prabhakar <[email protected]>
Tested-by: Lad Prabhakar <[email protected]> #
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
18 lines
419 B
C
18 lines
419 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* Copyright (c) 2021 Western Digital Corporation or its affiliates.
|
|
*/
|
|
|
|
#include <asm/dma-noncoherent.h>
|
|
|
|
struct riscv_nonstd_cache_ops noncoherent_cache_ops __ro_after_init;
|
|
|
|
void
|
|
riscv_noncoherent_register_cache_ops(const struct riscv_nonstd_cache_ops *ops)
|
|
{
|
|
if (!ops)
|
|
return;
|
|
noncoherent_cache_ops = *ops;
|
|
}
|
|
EXPORT_SYMBOL_GPL(riscv_noncoherent_register_cache_ops);
|