mirror of
https://github.com/torvalds/linux.git
synced 2024-10-30 08:42:47 +00:00
[MIPS] Fix atomic*_sub_if_positive return value.
Reported and initial fix by Thomas Koeller <thomas.koeller@baslerweb.com>, rewritten by me. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
9b6695a8ad
commit
92f22c183c
@ -250,7 +250,10 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
|
||||
" subu %0, %1, %3 \n"
|
||||
" bltz %0, 1f \n"
|
||||
" sc %0, %2 \n"
|
||||
" .set noreorder \n"
|
||||
" beqzl %0, 1b \n"
|
||||
" subu %0, %1, %3 \n"
|
||||
" .set reorder \n"
|
||||
" sync \n"
|
||||
"1: \n"
|
||||
" .set mips0 \n"
|
||||
@ -266,7 +269,10 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
|
||||
" subu %0, %1, %3 \n"
|
||||
" bltz %0, 1f \n"
|
||||
" sc %0, %2 \n"
|
||||
" .set noreorder \n"
|
||||
" beqz %0, 1b \n"
|
||||
" subu %0, %1, %3 \n"
|
||||
" .set reorder \n"
|
||||
" sync \n"
|
||||
"1: \n"
|
||||
" .set mips0 \n"
|
||||
@ -598,7 +604,10 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
|
||||
" dsubu %0, %1, %3 \n"
|
||||
" bltz %0, 1f \n"
|
||||
" scd %0, %2 \n"
|
||||
" .set noreorder \n"
|
||||
" beqzl %0, 1b \n"
|
||||
" dsubu %0, %1, %3 \n"
|
||||
" .set reorder \n"
|
||||
" sync \n"
|
||||
"1: \n"
|
||||
" .set mips0 \n"
|
||||
@ -614,7 +623,10 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
|
||||
" dsubu %0, %1, %3 \n"
|
||||
" bltz %0, 1f \n"
|
||||
" scd %0, %2 \n"
|
||||
" .set noreorder \n"
|
||||
" beqz %0, 1b \n"
|
||||
" dsubu %0, %1, %3 \n"
|
||||
" .set reorder \n"
|
||||
" sync \n"
|
||||
"1: \n"
|
||||
" .set mips0 \n"
|
||||
|
Loading…
Reference in New Issue
Block a user