eal/ppc: support pause API
authorJerin Jacob <jerin.jacob@caviumnetworks.com>
Sun, 7 Oct 2018 06:18:57 +0000 (11:48 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 26 Oct 2018 12:37:56 +0000 (14:37 +0200)
Add support for rte_pause() implementation for ppc64.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
lib/librte_eal/common/include/arch/ppc_64/rte_pause.h

index 8bd8357..16e47ce 100644 (file)
@@ -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