[PATCH] tools: Add barrier instructions for PPC64

Timothy Pearson posted 1 patch 19 hours ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/1520444748.4126.1761694677296.JavaMail.zimbra@raptorengineeringinc.com
tools/include/xen-barrier.h | 4 ++++
1 file changed, 4 insertions(+)
[PATCH] tools: Add barrier instructions for PPC64
Posted by Timothy Pearson 19 hours ago
Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com>
---
 tools/include/xen-barrier.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/include/xen-barrier.h b/tools/include/xen-barrier.h
index 5c22ee112c..e738a647a1 100644
--- a/tools/include/xen-barrier.h
+++ b/tools/include/xen-barrier.h
@@ -32,6 +32,10 @@
 #define xen_mb()   asm volatile ("dmb sy" : : : "memory")
 #define xen_rmb()  asm volatile ("dmb sy" : : : "memory")
 #define xen_wmb()  asm volatile ("dmb sy" : : : "memory")
+#elif defined(__ppc64__) || defined(__PPC64__)
+#define xen_mb()   asm volatile ("sync" : : : "memory")
+#define xen_rmb()  asm volatile ("sync" : : : "memory")
+#define xen_wmb()  asm volatile ("sync" : : : "memory")
 #else
 #error "Define barriers"
 #endif
-- 
2.39.5