summaryrefslogtreecommitdiffstats
path: root/include/asm-arm/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-arm/atomic.h')
-rw-r--r--include/asm-arm/atomic.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-arm/atomic.h b/include/asm-arm/atomic.h
index 75b802719723..5f827509e923 100644
--- a/include/asm-arm/atomic.h
+++ b/include/asm-arm/atomic.h
@@ -87,6 +87,7 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
do {
__asm__ __volatile__("@ atomic_cmpxchg\n"
"ldrex %1, [%2]\n"
+ "mov %0, #0\n"
"teq %1, %3\n"
"strexeq %0, %4, [%2]\n"
: "=&r" (res), "=&r" (oldval)
OpenPOWER on IntegriCloud