xref: /linux/arch/riscv/mm/pmem.c (revision 0526b56cbc3c489642bd6a5fe4b718dea7ef0ee8)
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Copyright (C) 2022 Ventana Micro Systems Inc.
4  */
5 
6 #include <linux/export.h>
7 #include <linux/libnvdimm.h>
8 
9 #include <asm/cacheflush.h>
10 
11 void arch_wb_cache_pmem(void *addr, size_t size)
12 {
13 	ALT_CMO_OP(clean, addr, size, riscv_cbom_block_size);
14 }
15 EXPORT_SYMBOL_GPL(arch_wb_cache_pmem);
16 
17 void arch_invalidate_pmem(void *addr, size_t size)
18 {
19 	ALT_CMO_OP(inval, addr, size, riscv_cbom_block_size);
20 }
21 EXPORT_SYMBOL_GPL(arch_invalidate_pmem);
22