This fixes the macro xchg to correctly map to the __xchg function for
ppc. The latest change was highly suggested by Jimi and should be the
approach that should be taken to solve this problem.

Signed-off-by: Jerone Young <[EMAIL PROTECTED]>


diff -r adf7f391be71 xen/include/asm-powerpc/system.h
--- a/xen/include/asm-powerpc/system.h	Thu Apr 05 06:51:53 2007 +0100
+++ b/xen/include/asm-powerpc/system.h	Thu Jan 30 15:39:05 2031 -0600
@@ -28,7 +28,11 @@
 #include <asm/processor.h>
 #include <asm/msr.h>
 
-#define xchg(ptr,v) ((__typeof__(*(ptr)))__xchg((unsigned long)(v),(ptr),sizeof(*(ptr))))
+#define xchg(ptr,x) 							       \
+({									       \
+	__typeof__(*(ptr)) _x_ = (x);					       \
+	(__typeof__(*(ptr))) __xchg((ptr), (unsigned long)_x_, sizeof(*(ptr))); \
+})
 
 static __inline__ unsigned long
 __xchg_u32(volatile int *m, unsigned long val)
_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel

Reply via email to