aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2010-06-25 17:02:40 -0400
committerChris Metcalf <cmetcalf@tilera.com>2010-07-06 13:41:39 -0400
commit2db098278118ed58f4b407ceda691e349df043ce (patch)
tree91f819e1f5931f92921dbf44c99d2e1a0bc18f58
parent863fbac67138882b99fc60fcb0ec568bbad9a44f (diff)
arch/tile: Fix bug in support for atomic64_xx() ops.
This wasn't properly tested until the perf-event subsystem started to get brought up under the tile architecture. The bug caused bogus atomic64_cmpxchg() values to be returned, among other things. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--arch/tile/lib/atomic_asm_32.S7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/tile/lib/atomic_asm_32.S b/arch/tile/lib/atomic_asm_32.S
index c0d058578192..5a5514b77e78 100644
--- a/arch/tile/lib/atomic_asm_32.S
+++ b/arch/tile/lib/atomic_asm_32.S
@@ -89,11 +89,11 @@ STD_ENTRY_SECTION(__atomic\name, .text.atomic)
89 lh r22, r0 89 lh r22, r0
90 .else 90 .else
91 lw r22, r0 91 lw r22, r0
92 addi r23, r0, 4 92 addi r28, r0, 4
93 .endif 93 .endif
94 } 94 }
95 .ifc \bitwidth,64 95 .ifc \bitwidth,64
96 lw r23, r23 96 lw r23, r28
97 .endif 97 .endif
98 \body /* set r24, and r25 if 64-bit */ 98 \body /* set r24, and r25 if 64-bit */
99 { 99 {
@@ -109,11 +109,10 @@ STD_ENTRY_SECTION(__atomic\name, .text.atomic)
109 sh r0, r24 109 sh r0, r24
110 .else 110 .else
111 sw r0, r24 111 sw r0, r24
112 addi r23, r0, 4
113 .endif 112 .endif
114 } 113 }
115 .ifc \bitwidth,64 114 .ifc \bitwidth,64
116 sw r23, r25 115 sw r28, r25
117 .endif 116 .endif
118 mf 117 mf
1193: { 1183: {