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 #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 ("pld [%0]" : : "r" (p)); 19 } 20 21 static inline void rte_prefetch1(const volatile void *p) 22 { 23 asm volatile ("pld [%0]" : : "r" (p)); 24 } 25 26 static inline void rte_prefetch2(const volatile void *p) 27 { 28 asm volatile ("pld [%0]" : : "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 __rte_experimental 38 static inline void 39 rte_cldemote(const volatile void *p) 40 { 41 RTE_SET_USED(p); 42 } 43 44 #ifdef __cplusplus 45 } 46 #endif 47 48 #endif /* _RTE_PREFETCH_ARM32_H_ */ 49