From: tip-bot for Peter Zijlstra <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
markos.chandras@imgtec.com, torvalds@linux-foundation.org,
peterz@infradead.org, paulmck@linux.vnet.ibm.com,
paul.burton@imgtec.com, macro@codesourcery.com,
linux@roeck-us.net, bvanassche@acm.org, ralf@linux-mips.org,
hare@suse.de, sfr@canb.auug.org.au, tglx@linutronix.de
Subject: [tip:locking/arch] locking, mips: Fix atomics
Date: Wed, 10 Sep 2014 10:31:37 -0700 [thread overview]
Message-ID: <tip-da4c54457e6d8262423aded4bcbccc4103049506@git.kernel.org> (raw)
In-Reply-To: <20140902202126.GA3190@worktop.ger.corp.intel.com>
Commit-ID: da4c54457e6d8262423aded4bcbccc4103049506
Gitweb: http://git.kernel.org/tip/da4c54457e6d8262423aded4bcbccc4103049506
Author: Peter Zijlstra <peterz@infradead.org>
AuthorDate: Tue, 2 Sep 2014 22:21:26 +0200
Committer: Ingo Molnar <mingo@kernel.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@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Maciej W. Rozycki <macro@codesourcery.com>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Link: http://lkml.kernel.org/r/20140902202126.GA3190@worktop.ger.corp.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.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; \
\
next prev parent reply other threads:[~2014-09-10 17:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-22 22:04 linux-next: Tree for Aug 23 Stephen Rothwell
2014-08-25 4:57 ` Guenter Roeck
2014-09-01 15:58 ` Peter Zijlstra
2014-09-01 16:46 ` Guenter Roeck
2014-09-01 19:04 ` Peter Zijlstra
2014-09-02 9:40 ` Peter Zijlstra
2014-09-02 9:55 ` Peter Zijlstra
2014-09-02 19:04 ` Guenter Roeck
2014-09-02 20:21 ` Peter Zijlstra
2014-09-02 23:50 ` Guenter Roeck
2014-09-10 17:31 ` tip-bot for Peter Zijlstra [this message]
2014-09-02 17:59 ` Guenter Roeck
2014-09-10 17:31 ` [tip:locking/arch] locking, sparc64: Fix atomics tip-bot for Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-da4c54457e6d8262423aded4bcbccc4103049506@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bvanassche@acm.org \
--cc=hare@suse.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=macro@codesourcery.com \
--cc=markos.chandras@imgtec.com \
--cc=mingo@kernel.org \
--cc=paul.burton@imgtec.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=ralf@linux-mips.org \
--cc=sfr@canb.auug.org.au \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome