xref: /dpdk/lib/eal/riscv/include/rte_prefetch.h (revision 42a8fc7daa46256d150278fc9a7a846e27945a0c)
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 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 #include <rte_common.h>
16 #include "generic/rte_prefetch.h"
17 
18 static inline void rte_prefetch0(const volatile void *p)
19 {
20 	RTE_SET_USED(p);
21 }
22 
23 static inline void rte_prefetch1(const volatile void *p)
24 {
25 	RTE_SET_USED(p);
26 }
27 
28 static inline void rte_prefetch2(const volatile void *p)
29 {
30 	RTE_SET_USED(p);
31 }
32 
33 static inline void rte_prefetch_non_temporal(const volatile void *p)
34 {
35 	/* non-temporal version not available, fallback to rte_prefetch0 */
36 	rte_prefetch0(p);
37 }
38 
39 __rte_experimental
40 static inline void
41 rte_cldemote(const volatile void *p)
42 {
43 	RTE_SET_USED(p);
44 }
45 
46 #ifdef __cplusplus
47 }
48 #endif
49 
50 #endif /* RTE_PREFETCH_RISCV_H */
51