xref: /dpdk/lib/eal/arm/include/rte_prefetch_32.h (revision daa02b5cddbb8e11b31d41e2bf7bb1ae64dcae2f)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2015 RehiveTech. All rights reserved.
3  */
4 
5 #ifndef _RTE_PREFETCH_ARM32_H_
6 #define _RTE_PREFETCH_ARM32_H_
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 #include <rte_common.h>
13 #include "generic/rte_prefetch.h"
14 
15 static inline void rte_prefetch0(const volatile void *p)
16 {
17 	asm volatile ("pld [%0]" : : "r" (p));
18 }
19 
20 static inline void rte_prefetch1(const volatile void *p)
21 {
22 	asm volatile ("pld [%0]" : : "r" (p));
23 }
24 
25 static inline void rte_prefetch2(const volatile void *p)
26 {
27 	asm volatile ("pld [%0]" : : "r" (p));
28 }
29 
30 static inline void rte_prefetch_non_temporal(const volatile void *p)
31 {
32 	/* non-temporal version not available, fallback to rte_prefetch0 */
33 	rte_prefetch0(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_ARM32_H_ */
48