diff options
| author | Anton Blanchard <anton@samba.org> | 2003-02-11 08:45:43 +1100 |
|---|---|---|
| committer | Anton Blanchard <anton@samba.org> | 2003-02-11 08:45:43 +1100 |
| commit | 4d8c3efdcd7d55512a3994b82e58e7fe1239c335 (patch) | |
| tree | 0353e07a69e152e1d021791b176a053e09bed0d8 /include | |
| parent | d7637891753a25680fec54221b7cb3bc666e4db2 (diff) | |
ppc64: Fix nasty bug in cmpxchg where we would sign extend the old value.
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-ppc64/system.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-ppc64/system.h b/include/asm-ppc64/system.h index 0e8a106ac123..6e5ddfaf9614 100644 --- a/include/asm-ppc64/system.h +++ b/include/asm-ppc64/system.h @@ -196,7 +196,7 @@ __xchg(volatile void *ptr, unsigned long x, int size) static __inline__ unsigned long __cmpxchg_u32(volatile int *p, int old, int new) { - int prev; + unsigned int prev; __asm__ __volatile__ ( EIEIO_ON_SMP @@ -218,7 +218,7 @@ __cmpxchg_u32(volatile int *p, int old, int new) static __inline__ unsigned long __cmpxchg_u64(volatile long *p, unsigned long old, unsigned long new) { - int prev; + unsigned long prev; __asm__ __volatile__ ( EIEIO_ON_SMP |
