eal: move arch-specific header files
[dpdk.git] / lib / librte_eal / ppc / include / rte_prefetch.h
1 /*
2  * SPDX-License-Identifier: BSD-3-Clause
3  * Copyright (C) IBM Corporation 2014.
4  */
5
6 #ifndef _RTE_PREFETCH_PPC_64_H_
7 #define _RTE_PREFETCH_PPC_64_H_
8
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12
13 #include <rte_common.h>
14 #include "generic/rte_prefetch.h"
15
16 static inline void rte_prefetch0(const volatile void *p)
17 {
18         asm volatile ("dcbt 0,%[p],0" : : [p] "r" (p));
19 }
20
21 static inline void rte_prefetch1(const volatile void *p)
22 {
23         asm volatile ("dcbt 0,%[p],0" : : [p] "r" (p));
24 }
25
26 static inline void rte_prefetch2(const volatile void *p)
27 {
28         asm volatile ("dcbt 0,%[p],0" : : [p] "r" (p));
29 }
30
31 static inline void rte_prefetch_non_temporal(const volatile void *p)
32 {
33         /* non-temporal version not available, fallback to rte_prefetch0 */
34         rte_prefetch0(p);
35 }
36
37 #ifdef __cplusplus
38 }
39 #endif
40
41 #endif /* _RTE_PREFETCH_PPC_64_H_ */