xref: /openbmc/linux/arch/riscv/mm/cache-ops.c (revision b4ad5617)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * Copyright (c) 2021 Western Digital Corporation or its affiliates.
4  */
5 
6 #include <asm/dma-noncoherent.h>
7 
8 struct riscv_nonstd_cache_ops noncoherent_cache_ops __ro_after_init;
9 
10 void
riscv_noncoherent_register_cache_ops(const struct riscv_nonstd_cache_ops * ops)11 riscv_noncoherent_register_cache_ops(const struct riscv_nonstd_cache_ops *ops)
12 {
13 	if (!ops)
14 		return;
15 	noncoherent_cache_ops = *ops;
16 }
17 EXPORT_SYMBOL_GPL(riscv_noncoherent_register_cache_ops);
18