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