All of lore.kernel.org
 help / color / mirror / Atom feed
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,
	torvalds@linux-foundation.org, peterz@infradead.org,
	davem@davemloft.net, linux@roeck-us.net, tglx@linutronix.de,
	sfr@canb.auug.org.au
Subject: [tip:locking/arch] locking, sparc64: Fix atomics
Date: Wed, 10 Sep 2014 10:31:24 -0700	[thread overview]
Message-ID: <tip-caa17d49f9a5cc09b3bbb101dc640f914f3b4ff7@git.kernel.org> (raw)
In-Reply-To: <20140902094016.GD31157@worktop.ger.corp.intel.com>

Commit-ID:  caa17d49f9a5cc09b3bbb101dc640f914f3b4ff7
Gitweb:     http://git.kernel.org/tip/caa17d49f9a5cc09b3bbb101dc640f914f3b4ff7
Author:     Peter Zijlstra <peterz@infradead.org>
AuthorDate: Tue, 2 Sep 2014 11:40:16 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 10 Sep 2014 11:45:04 +0200

locking, sparc64: Fix atomics

The patch folding the atomic ops had a silly fail in the _return primitives.

Fixes: 4f3316c2b5fe ("locking,arch,sparc: 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: "David S. Miller" <davem@davemloft.net>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: David S. Miller <davem@davemloft.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: sparclinux@vger.kernel.org
Link: http://lkml.kernel.org/r/20140902094016.GD31157@worktop.ger.corp.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/sparc/lib/atomic_64.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/lib/atomic_64.S b/arch/sparc/lib/atomic_64.S
index 96d70b4..05dac43 100644
--- a/arch/sparc/lib/atomic_64.S
+++ b/arch/sparc/lib/atomic_64.S
@@ -37,7 +37,7 @@ ENTRY(atomic_##op##_return) /* %o0 = increment, %o1 = atomic_ptr */	\
 	cas	[%o1], %g1, %g7;					\
 	cmp	%g1, %g7;						\
 	bne,pn	%icc, BACKOFF_LABEL(2f, 1b);				\
-	 add	%g1, %o0, %g1;						\
+	 op	%g1, %o0, %g1;						\
 	retl;								\
 	 sra	%g1, 0, %o0;						\
 2:	BACKOFF_SPIN(%o2, %o3, 1b);					\
@@ -76,7 +76,7 @@ ENTRY(atomic64_##op##_return) /* %o0 = increment, %o1 = atomic_ptr */	\
 	bne,pn	%xcc, BACKOFF_LABEL(2f, 1b);				\
 	 nop;								\
 	retl;								\
-	 add	%g1, %o0, %o0;						\
+	 op	%g1, %o0, %o0;						\
 2:	BACKOFF_SPIN(%o2, %o3, 1b);					\
 ENDPROC(atomic64_##op##_return);
 

      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:locking/arch] locking, mips: Fix atomics tip-bot for Peter Zijlstra
2014-09-02 17:59           ` linux-next: Tree for Aug 23 Guenter Roeck
2014-09-10 17:31           ` tip-bot for Peter Zijlstra [this message]

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-caa17d49f9a5cc09b3bbb101dc640f914f3b4ff7@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=davem@davemloft.net \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.