]> git.proxmox.com Git - ceph.git/blame - ceph/src/spdk/dpdk/lib/librte_eal/ppc/include/rte_prefetch.h
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / dpdk / lib / librte_eal / ppc / include / rte_prefetch.h
CommitLineData
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
10extern "C" {
11#endif
12
13#include <rte_common.h>
14#include "generic/rte_prefetch.h"
15
16static inline void rte_prefetch0(const volatile void *p)
17{
f67539c2 18 asm volatile ("dcbt 0,%[p],0" : : [p] "r" (p));
11fdf7f2
TL
19}
20
21static inline void rte_prefetch1(const volatile void *p)
22{
f67539c2 23 asm volatile ("dcbt 0,%[p],0" : : [p] "r" (p));
11fdf7f2
TL
24}
25
26static inline void rte_prefetch2(const volatile void *p)
27{
f67539c2 28 asm volatile ("dcbt 0,%[p],0" : : [p] "r" (p));
11fdf7f2
TL
29}
30
31static 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_ */