1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2015 Intel Corporation
5 #ifndef _RTE_PREFETCH_H_
6 #define _RTE_PREFETCH_H_
11 * Prefetch operations.
13 * This file defines an API for prefetch macros / inline-functions,
14 * which are architecture-dependent. Prefetching occurs when a
15 * processor requests an instruction or data from memory to cache
16 * before it is actually needed, potentially speeding up the execution of the
21 * Prefetch a cache line into all cache levels.
25 static inline void rte_prefetch0(const volatile void *p);
28 * Prefetch a cache line into all cache levels except the 0th cache level.
32 static inline void rte_prefetch1(const volatile void *p);
35 * Prefetch a cache line into all cache levels except the 0th and 1th cache
40 static inline void rte_prefetch2(const volatile void *p);
43 * Prefetch a cache line into all cache levels (non-temporal/transient version)
45 * The non-temporal prefetch is intended as a prefetch hint that processor will
46 * use the prefetched data only once or short period, unlike the
47 * rte_prefetch0() function which imply that prefetched data to use repeatedly.
52 static inline void rte_prefetch_non_temporal(const volatile void *p);
54 #endif /* _RTE_PREFETCH_H_ */