aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/include/asm/cmpxchg-llsc.h
diff options
context:
space:
mode:
authorAoi Shinkai <shinkoi2005@gmail.com>2009-06-10 16:15:42 +0000
committerPaul Mundt <lethal@linux-sh.org>2009-06-11 09:31:55 +0300
commit4c7c99788631bab177bd51e15e893be4689bb085 (patch)
tree52e50e0b2a30b31dc8c6460e98279b3c1b47c476 /arch/sh/include/asm/cmpxchg-llsc.h
parentf168dd00a9440a6f644db73bda47718fd12008e4 (diff)
sh: Fix sh4a llsc-based cmpxchg()
This fixes up a typo in the ll/sc based cmpxchg code which apparently wasn't getting a lot of testing due to the swapped old/new pair. With that fixed up, the ll/sc code also starts using it and provides its own atomic_add_unless(). Signed-off-by: Aoi Shinkai <shinkoi2005@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/cmpxchg-llsc.h')
-rw-r--r--arch/sh/include/asm/cmpxchg-llsc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/include/asm/cmpxchg-llsc.h b/arch/sh/include/asm/cmpxchg-llsc.h
index 0fac3da536ca..47136661a203 100644
--- a/arch/sh/include/asm/cmpxchg-llsc.h
+++ b/arch/sh/include/asm/cmpxchg-llsc.h
@@ -55,7 +55,7 @@ __cmpxchg_u32(volatile int *m, unsigned long old, unsigned long new)
"mov %0, %1 \n\t"
"cmp/eq %1, %3 \n\t"
"bf 2f \n\t"
- "mov %3, %0 \n\t"
+ "mov %4, %0 \n\t"
"2: \n\t"
"movco.l %0, @%2 \n\t"
"bf 1b \n\t"