xref: /dpdk/lib/eal/riscv/include/rte_prefetch.h (revision 719834a6849e1daf4a70ff7742bbcc3ae7e25607)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2014 IBM Corporation
3  * Copyright(c) 2022 StarFive
4  * Copyright(c) 2022 SiFive
5  * Copyright(c) 2022 Semihalf
6  */
7 
8 #ifndef RTE_PREFETCH_RISCV_H
9 #define RTE_PREFETCH_RISCV_H
10 
11 #include <rte_compat.h>
12 #include <rte_common.h>
13 #include "generic/rte_prefetch.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 static inline void rte_prefetch0(const volatile void *p)
20 {
21 	RTE_SET_USED(p);
22 }
23 
24 static inline void rte_prefetch1(const volatile void *p)
25 {
26 	RTE_SET_USED(p);
27 }
28 
29 static inline void rte_prefetch2(const volatile void *p)
30 {
31 	RTE_SET_USED(p);
32 }
33 
34 static inline void rte_prefetch_non_temporal(const volatile void *p)
35 {
36 	/* non-temporal version not available, fallback to rte_prefetch0 */
37 	rte_prefetch0(p);
38 }
39 
40 __rte_experimental
41 static inline void
42 rte_cldemote(const volatile void *p)
43 {
44 	RTE_SET_USED(p);
45 }
46 
47 #ifdef __cplusplus
48 }
49 #endif
50 
51 #endif /* RTE_PREFETCH_RISCV_H */
52