From: Jerin Jacob Date: Sun, 7 Oct 2018 06:18:57 +0000 (+0530) Subject: eal/ppc: support pause API X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1f8494f00275d76dc3e0019866b88c356e31cbf3;p=dpdk.git eal/ppc: support pause API Add support for rte_pause() implementation for ppc64. Signed-off-by: Jerin Jacob Acked-by: Chao Zhu --- diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h b/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h index 8bd8357649..16e47ce22f 100644 --- a/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h +++ b/lib/librte_eal/common/include/arch/ppc_64/rte_pause.h @@ -9,10 +9,17 @@ extern "C" { #endif +#include "rte_atomic.h" + #include "generic/rte_pause.h" static inline void rte_pause(void) { + /* Set hardware multi-threading low priority */ + asm volatile("or 1,1,1"); + /* Set hardware multi-threading medium priority */ + asm volatile("or 2,2,2"); + rte_compiler_barrier(); } #ifdef __cplusplus