summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2010-06-25 23:02:40 +0200
committerChris Metcalf <cmetcalf@tilera.com>2010-07-06 19:41:39 +0200
commit2db098278118ed58f4b407ceda691e349df043ce (patch)
tree91f819e1f5931f92921dbf44c99d2e1a0bc18f58 /arch
parentarch/tile: Shrink the tile-opcode files considerably. (diff)
downloadlinux-2db098278118ed58f4b407ceda691e349df043ce.tar.xz
linux-2db098278118ed58f4b407ceda691e349df043ce.zip
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>
Diffstat (limited to 'arch')
-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)
lh r22, r0
.else
lw r22, r0
- addi r23, r0, 4
+ addi r28, r0, 4
.endif
}
.ifc \bitwidth,64
- lw r23, r23
+ lw r23, r28
.endif
\body /* set r24, and r25 if 64-bit */
{
@@ -109,11 +109,10 @@ STD_ENTRY_SECTION(__atomic\name, .text.atomic)
sh r0, r24
.else
sw r0, r24
- addi r23, r0, 4
.endif
}
.ifc \bitwidth,64
- sw r23, r25
+ sw r28, r25
.endif
mf
3: {