xref: /dpdk/lib/eal/arm/include/rte_prefetch_64.h (revision 719834a6849e1daf4a70ff7742bbcc3ae7e25607)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2015 Cavium, Inc
3  */
4 
5 #ifndef _RTE_PREFETCH_ARM_64_H_
6 #define _RTE_PREFETCH_ARM_64_H_
7 
8 #include <rte_compat.h>
9 #include <rte_common.h>
10 #include "generic/rte_prefetch.h"
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 static inline void rte_prefetch0(const volatile void *p)
17 {
18 	asm volatile ("PRFM PLDL1KEEP, [%0]" : : "r" (p));
19 }
20 
21 static inline void rte_prefetch1(const volatile void *p)
22 {
23 	asm volatile ("PRFM PLDL2KEEP, [%0]" : : "r" (p));
24 }
25 
26 static inline void rte_prefetch2(const volatile void *p)
27 {
28 	asm volatile ("PRFM PLDL3KEEP, [%0]" : : "r" (p));
29 }
30 
31 static inline void rte_prefetch_non_temporal(const volatile void *p)
32 {
33 	asm volatile ("PRFM PLDL1STRM, [%0]" : : "r" (p));
34 }
35 
36 __rte_experimental
37 static inline void
38 rte_cldemote(const volatile void *p)
39 {
40 	RTE_SET_USED(p);
41 }
42 
43 #ifdef __cplusplus
44 }
45 #endif
46 
47 #endif /* _RTE_PREFETCH_ARM_64_H_ */
48