New upstream version 18.08
[deb_dpdk.git] / lib / librte_eal / common / include / arch / arm / rte_prefetch_32.h
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 #ifdef __cplusplus
37 }
38 #endif
39
40 #endif /* _RTE_PREFETCH_ARM32_H_ */