summaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/files/arch/rlx/include/asm/cmpxchg.h
diff options
context:
space:
mode:
authorRoman Yeryomin <roman@advem.lv>2013-05-17 20:40:24 +0300
committerRoman Yeryomin <roman@advem.lv>2013-05-17 20:40:24 +0300
commite6d87036412b952cb083eff2dc716aee97a771f2 (patch)
tree273dd3daaa85553832d3cc6d48276229dc7fbe09 /target/linux/realtek/files/arch/rlx/include/asm/cmpxchg.h
parenta18fec42221baa52fff4c5ffd45ec8f32e3add36 (diff)
Move to rsdk 3.2.4. Compiles cleanly.
Signed-off-by: Roman Yeryomin <roman@advem.lv>
Diffstat (limited to 'target/linux/realtek/files/arch/rlx/include/asm/cmpxchg.h')
-rw-r--r--target/linux/realtek/files/arch/rlx/include/asm/cmpxchg.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/target/linux/realtek/files/arch/rlx/include/asm/cmpxchg.h b/target/linux/realtek/files/arch/rlx/include/asm/cmpxchg.h
index dbf73e889..ea95fdb85 100644
--- a/target/linux/realtek/files/arch/rlx/include/asm/cmpxchg.h
+++ b/target/linux/realtek/files/arch/rlx/include/asm/cmpxchg.h
@@ -21,13 +21,10 @@
__asm__ __volatile__( \
" .set push \n" \
" .set noat \n" \
- " .set mips3 \n" \
"1: " ld " %0, %2 # __cmpxchg_asm \n" \
" nop \n" \
" bne %0, %z3, 2f \n" \
- " .set mips0 \n" \
" move $1, %z4 \n" \
- " .set mips3 \n" \
" " st " $1, %1 \n" \
" beqz $1, 3f \n" \
"2: \n" \
@@ -48,12 +45,9 @@
__asm__ __volatile__( \
" .set push \n" \
" .set noat \n" \
- " .set mips3 \n" \
"1: " ld " %0, %2 # __cmpxchg_asm \n" \
" bne %0, %z3, 2f \n" \
- " .set mips0 \n" \
" move $1, %z4 \n" \
- " .set mips3 \n" \
" " st " $1, %1 \n" \
" beqz $1, 3f \n" \
"2: \n" \
@@ -71,13 +65,13 @@
#define __cmpxchg_asm(ld, st, m, old, new) \
({ \
__typeof(*(m)) __ret; \
- unsigned long __flags; \
+ unsigned long __flags; \
\
- raw_local_irq_save(__flags); \
- __ret = *m; \
- if (__ret == old) \
- *m = new; \
- raw_local_irq_restore(__flags); \
+ raw_local_irq_save(__flags); \
+ __ret = *m; \
+ if (__ret == old) \
+ *m = new; \
+ raw_local_irq_restore(__flags); \
\
__ret; \
})