]>
Commit | Line | Data |
---|---|---|
f67539c2 TL |
1 | /* |
2 | * SPDX-License-Identifier: BSD-3-Clause | |
3 | * Copyright (C) IBM Corporation 2014. | |
11fdf7f2 TL |
4 | */ |
5 | ||
f67539c2 TL |
6 | #ifndef _RTE_PREFETCH_PPC_64_H_ |
7 | #define _RTE_PREFETCH_PPC_64_H_ | |
11fdf7f2 TL |
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 | { | |
f67539c2 | 18 | asm volatile ("dcbt 0,%[p],0" : : [p] "r" (p)); |
11fdf7f2 TL |
19 | } |
20 | ||
21 | static inline void rte_prefetch1(const volatile void *p) | |
22 | { | |
f67539c2 | 23 | asm volatile ("dcbt 0,%[p],0" : : [p] "r" (p)); |
11fdf7f2 TL |
24 | } |
25 | ||
26 | static inline void rte_prefetch2(const volatile void *p) | |
27 | { | |
f67539c2 | 28 | asm volatile ("dcbt 0,%[p],0" : : [p] "r" (p)); |
11fdf7f2 TL |
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 | ||
f67539c2 | 41 | #endif /* _RTE_PREFETCH_PPC_64_H_ */ |