From ed4877da445dbab2a513e43873d94b9a0e4aed08 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Tue, 6 Sep 2005 13:05:58 +1000 Subject: [PATCH] --- yaml --- r: 7301 b: refs/heads/master c: b2c0ab17ba751abe13a28508b1ac7e9ca074cd87 h: refs/heads/master i: 7299: 52a9051ade4c9dd05d8d9ccd7657366e0e60f988 v: v3 --- [refs] | 2 +- trunk/include/asm-ppc64/system.h | 19 ++++++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 92ab63758fff..8b5488169fae 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4721e2214b5fd6eca48caea76afb1bad3148930f +refs/heads/master: b2c0ab17ba751abe13a28508b1ac7e9ca074cd87 diff --git a/trunk/include/asm-ppc64/system.h b/trunk/include/asm-ppc64/system.h index b9e1835351e9..c0396428cc3c 100644 --- a/trunk/include/asm-ppc64/system.h +++ b/trunk/include/asm-ppc64/system.h @@ -158,7 +158,7 @@ static inline int __is_processor(unsigned long pv) * is more like most of the other architectures. */ static __inline__ unsigned long -__xchg_u32(volatile int *m, unsigned long val) +__xchg_u32(volatile unsigned int *m, unsigned long val) { unsigned long dummy; @@ -200,7 +200,7 @@ __xchg_u64(volatile long *m, unsigned long val) extern void __xchg_called_with_bad_pointer(void); static __inline__ unsigned long -__xchg(volatile void *ptr, unsigned long x, int size) +__xchg(volatile void *ptr, unsigned long x, unsigned int size) { switch (size) { case 4: @@ -223,7 +223,7 @@ __xchg(volatile void *ptr, unsigned long x, int size) #define __HAVE_ARCH_CMPXCHG 1 static __inline__ unsigned long -__cmpxchg_u32(volatile int *p, int old, int new) +__cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) { unsigned int prev; @@ -271,7 +271,8 @@ __cmpxchg_u64(volatile long *p, unsigned long old, unsigned long new) extern void __cmpxchg_called_with_bad_pointer(void); static __inline__ unsigned long -__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) +__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, + unsigned int size) { switch (size) { case 4: @@ -283,13 +284,9 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) return old; } -#define cmpxchg(ptr,o,n) \ - ({ \ - __typeof__(*(ptr)) _o_ = (o); \ - __typeof__(*(ptr)) _n_ = (n); \ - (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \ - (unsigned long)_n_, sizeof(*(ptr))); \ - }) +#define cmpxchg(ptr,o,n)\ + ((__typeof__(*(ptr)))__cmpxchg((ptr),(unsigned long)(o),\ + (unsigned long)(n),sizeof(*(ptr)))) /* * We handle most unaligned accesses in hardware. On the other hand