[Spice-devel] [PATCH v2] spice-ppc: spice-protocol: adds powerpc64 mem barriers

Erlon Cruz erlon.cruz at br.flextronics.com
Mon Aug 13 07:15:46 PDT 2012


Signed-off-by: Erlon R. Cruz <erlon.cruz at br.flextronics.com>
Signed-off-by: Fabiano Fidêncio <Fabiano.Fidêncio at fit-tecnologia.org.br>
Signed-off-by: Rafael F. Santos <fonsecasantos.rafael at gmail.com>
---
 spice/barrier.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/spice/barrier.h b/spice/barrier.h
index 710da09..ed7200c 100644
--- a/spice/barrier.h
+++ b/spice/barrier.h
@@ -36,9 +36,11 @@
 
 #ifdef __i386__
 #define spice_mb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory")
-#else
+#elif __x86_64__
 //mfence
 #define spice_mb() __asm__ __volatile__ ("lock; addl $0,0(%%rsp)": : :"memory")
+#elif defined __PPC64__
+#define spice_mb()   __asm__ __volatile__ ("lwsync" : : : "memory")
 #endif
 
 #else
-- 
1.7.4.1



More information about the Spice-devel mailing list