1 // SPDX-License-Identifier: GPL-2.0 1 2 /* 3 * Copyright (C) 2022 Ventana Micro Systems In 4 */ 5 6 #include <linux/export.h> 7 #include <linux/libnvdimm.h> 8 9 #include <asm/cacheflush.h> 10 #include <asm/dma-noncoherent.h> 11 12 void arch_wb_cache_pmem(void *addr, size_t siz 13 { 14 #ifdef CONFIG_RISCV_NONSTANDARD_CACHE_OPS 15 if (unlikely(noncoherent_cache_ops.wba 16 noncoherent_cache_ops.wback(vi 17 return; 18 } 19 #endif 20 ALT_CMO_OP(CLEAN, addr, size, riscv_cb 21 } 22 EXPORT_SYMBOL_GPL(arch_wb_cache_pmem); 23 24 void arch_invalidate_pmem(void *addr, size_t s 25 { 26 #ifdef CONFIG_RISCV_NONSTANDARD_CACHE_OPS 27 if (unlikely(noncoherent_cache_ops.inv 28 noncoherent_cache_ops.inv(virt 29 return; 30 } 31 #endif 32 ALT_CMO_OP(INVAL, addr, size, riscv_cb 33 } 34 EXPORT_SYMBOL_GPL(arch_invalidate_pmem); 35
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.