summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2003-02-11 08:45:43 +1100
committerAnton Blanchard <anton@samba.org>2003-02-11 08:45:43 +1100
commit4d8c3efdcd7d55512a3994b82e58e7fe1239c335 (patch)
tree0353e07a69e152e1d021791b176a053e09bed0d8 /include
parentd7637891753a25680fec54221b7cb3bc666e4db2 (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.h4
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