[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-da4c54457e6d8262423aded4bcbccc4103049506@git.kernel.org>
Date: Wed, 10 Sep 2014 10:31:37 -0700
From: tip-bot for Peter Zijlstra <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
markos.chandras@...tec.com, torvalds@...ux-foundation.org,
peterz@...radead.org, paulmck@...ux.vnet.ibm.com,
paul.burton@...tec.com, macro@...esourcery.com, linux@...ck-us.net,
bvanassche@....org, ralf@...ux-mips.org, hare@...e.de,
sfr@...b.auug.org.au, tglx@...utronix.de
Subject: [tip:locking/arch] locking, mips: Fix atomics
Commit-ID: da4c54457e6d8262423aded4bcbccc4103049506
Gitweb: http://git.kernel.org/tip/da4c54457e6d8262423aded4bcbccc4103049506
Author: Peter Zijlstra <peterz@...radead.org>
AuthorDate: Tue, 2 Sep 2014 22:21:26 +0200
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 10 Sep 2014 11:45:06 +0200
locking, mips: Fix atomics
The patch folding the atomic ops had two silly fails in the _return
primitives.
Fixes: ef31563e950c ("locking,arch,mips: Fold atomic_ops")
Reported-by: Guenter Roeck <linux@...ck-us.net>
Tested-by: Guenter Roeck <linux@...ck-us.net>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Bart Van Assche <bvanassche@....org>
Cc: Hannes Reinecke <hare@...e.de>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Maciej W. Rozycki <macro@...esourcery.com>
Cc: Markos Chandras <markos.chandras@...tec.com>
Cc: Paul Burton <paul.burton@...tec.com>
Cc: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
Cc: Ralf Baechle <ralf@...ux-mips.org>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>
Link: http://lkml.kernel.org/r/20140902202126.GA3190@worktop.ger.corp.intel.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/mips/include/asm/atomic.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h
index 476fe3b..f3ee721 100644
--- a/arch/mips/include/asm/atomic.h
+++ b/arch/mips/include/asm/atomic.h
@@ -93,7 +93,7 @@ static __inline__ int atomic_##op##_return(int i, atomic_t * v) \
" " #asm_op " %0, %1, %3 \n" \
" sc %0, %2 \n" \
" beqzl %0, 1b \n" \
- " addu %0, %1, %3 \n" \
+ " " #asm_op " %0, %1, %3 \n" \
" .set mips0 \n" \
: "=&r" (result), "=&r" (temp), "+m" (v->counter) \
: "Ir" (i)); \
@@ -111,7 +111,7 @@ static __inline__ int atomic_##op##_return(int i, atomic_t * v) \
: "Ir" (i)); \
} while (unlikely(!result)); \
\
- result = temp + i; \
+ result = temp; result c_op i; \
} else { \
unsigned long flags; \
\
@@ -387,7 +387,7 @@ static __inline__ long atomic64_##op##_return(long i, atomic64_t * v) \
: "memory"); \
} while (unlikely(!result)); \
\
- result = temp + i; \
+ result = temp; result c_op i; \
} else { \
unsigned long flags; \
\
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists