diff options
author | Peter Zijlstra <peterz@infradead.org> | 2014-09-02 05:40:16 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-09-10 05:45:04 -0400 |
commit | caa17d49f9a5cc09b3bbb101dc640f914f3b4ff7 (patch) | |
tree | 2699fb03886e3c72d792e25e6ddb1055f61ca0e4 | |
parent | 560cb12a4080a48b84da8b96878cafbd193c4d64 (diff) |
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>
-rw-r--r-- | arch/sparc/lib/atomic_64.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/lib/atomic_64.S b/arch/sparc/lib/atomic_64.S index 96d70b4dbe77..05dac43907d1 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 */ \ | |||
37 | cas [%o1], %g1, %g7; \ | 37 | cas [%o1], %g1, %g7; \ |
38 | cmp %g1, %g7; \ | 38 | cmp %g1, %g7; \ |
39 | bne,pn %icc, BACKOFF_LABEL(2f, 1b); \ | 39 | bne,pn %icc, BACKOFF_LABEL(2f, 1b); \ |
40 | add %g1, %o0, %g1; \ | 40 | op %g1, %o0, %g1; \ |
41 | retl; \ | 41 | retl; \ |
42 | sra %g1, 0, %o0; \ | 42 | sra %g1, 0, %o0; \ |
43 | 2: BACKOFF_SPIN(%o2, %o3, 1b); \ | 43 | 2: BACKOFF_SPIN(%o2, %o3, 1b); \ |
@@ -76,7 +76,7 @@ ENTRY(atomic64_##op##_return) /* %o0 = increment, %o1 = atomic_ptr */ \ | |||
76 | bne,pn %xcc, BACKOFF_LABEL(2f, 1b); \ | 76 | bne,pn %xcc, BACKOFF_LABEL(2f, 1b); \ |
77 | nop; \ | 77 | nop; \ |
78 | retl; \ | 78 | retl; \ |
79 | add %g1, %o0, %o0; \ | 79 | op %g1, %o0, %o0; \ |
80 | 2: BACKOFF_SPIN(%o2, %o3, 1b); \ | 80 | 2: BACKOFF_SPIN(%o2, %o3, 1b); \ |
81 | ENDPROC(atomic64_##op##_return); | 81 | ENDPROC(atomic64_##op##_return); |
82 | 82 | ||