ia64/xen-unstable

changeset 14838:ebc4fb63113f

[XEN][POWERPC] Fix xchg macro.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Hollis Blanchard <hollisb@us.ibm.com>
date Thu Apr 12 10:27:05 2007 -0500 (2007-04-12)
parents bfe2136c163a
children 2c18e90a9c00
files xen/include/asm-powerpc/system.h
line diff
     1.1 --- a/xen/include/asm-powerpc/system.h	Wed Apr 11 14:34:08 2007 +0100
     1.2 +++ b/xen/include/asm-powerpc/system.h	Thu Apr 12 10:27:05 2007 -0500
     1.3 @@ -28,7 +28,11 @@
     1.4  #include <asm/processor.h>
     1.5  #include <asm/msr.h>
     1.6  
     1.7 -#define xchg(ptr,v) ((__typeof__(*(ptr)))__xchg((unsigned long)(v),(ptr),sizeof(*(ptr))))
     1.8 +#define xchg(ptr,x) 							       \
     1.9 +({									       \
    1.10 +	__typeof__(*(ptr)) _x_ = (x);					       \
    1.11 +	(__typeof__(*(ptr))) __xchg((ptr), (unsigned long)_x_, sizeof(*(ptr))); \
    1.12 +})
    1.13  
    1.14  static __inline__ unsigned long
    1.15  __xchg_u32(volatile int *m, unsigned long val)