xref: /dpdk/lib/eal/ppc/include/rte_pause.h (revision 719834a6849e1daf4a70ff7742bbcc3ae7e25607)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2017 Cavium, Inc
3  */
4 
5 #ifndef _RTE_PAUSE_PPC64_H_
6 #define _RTE_PAUSE_PPC64_H_
7 
8 #include "rte_atomic.h"
9 
10 #include "generic/rte_pause.h"
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 static inline void rte_pause(void)
17 {
18 	/* Set hardware multi-threading low priority */
19 	asm volatile("or 1,1,1");
20 	/* Set hardware multi-threading medium priority */
21 	asm volatile("or 2,2,2");
22 	rte_compiler_barrier();
23 }
24 
25 #ifdef __cplusplus
26 }
27 #endif
28 
29 #endif /* _RTE_PAUSE_PPC64_H_ */
30