199a2dd95SBruce Richardson /* SPDX-License-Identifier: BSD-3-Clause 299a2dd95SBruce Richardson * Copyright(c) 2017 Cavium, Inc 399a2dd95SBruce Richardson */ 499a2dd95SBruce Richardson 599a2dd95SBruce Richardson #ifndef _RTE_PAUSE_PPC64_H_ 699a2dd95SBruce Richardson #define _RTE_PAUSE_PPC64_H_ 799a2dd95SBruce Richardson 899a2dd95SBruce Richardson #include "rte_atomic.h" 999a2dd95SBruce Richardson 1099a2dd95SBruce Richardson #include "generic/rte_pause.h" 1199a2dd95SBruce Richardson 12*719834a6SMattias Rönnblom #ifdef __cplusplus 13*719834a6SMattias Rönnblom extern "C" { 14*719834a6SMattias Rönnblom #endif 15*719834a6SMattias Rönnblom 1699a2dd95SBruce Richardson static inline void rte_pause(void) 1799a2dd95SBruce Richardson { 1899a2dd95SBruce Richardson /* Set hardware multi-threading low priority */ 1999a2dd95SBruce Richardson asm volatile("or 1,1,1"); 2099a2dd95SBruce Richardson /* Set hardware multi-threading medium priority */ 2199a2dd95SBruce Richardson asm volatile("or 2,2,2"); 2299a2dd95SBruce Richardson rte_compiler_barrier(); 2399a2dd95SBruce Richardson } 2499a2dd95SBruce Richardson 2599a2dd95SBruce Richardson #ifdef __cplusplus 2699a2dd95SBruce Richardson } 2799a2dd95SBruce Richardson #endif 2899a2dd95SBruce Richardson 2999a2dd95SBruce Richardson #endif /* _RTE_PAUSE_PPC64_H_ */ 30