summaryrefslogtreecommitdiff
path: root/arch/metag
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2016-05-03 08:11:21 (GMT)
committerJames Hogan <james.hogan@imgtec.com>2016-05-03 08:25:46 (GMT)
commit096a8b6d5e7ab9f8ca3d2474b3ca6a1fe79e0371 (patch)
treee6051225686d798abd3e841f6575c6a920ce1a14 /arch/metag
parentf5d163aad31e4ec30f7258e655503824a2b03d45 (diff)
downloadlinux-096a8b6d5e7ab9f8ca3d2474b3ca6a1fe79e0371.tar.xz
metag: Fix atomic_*_return inline asm constraints
The argument i of atomic_*_return() operations is given to inline asm with the "bd" constraint, which means "An Op2 register where Op1 is a data unit register and the instruction supports O2R", however Op1 is constrained by "da" which allows an address unit register to be used. Fix the constraint to use "br", meaning "An Op2 register and the instruction supports O2R", i.e. not requiring Op1 to be a data unit register. Fixes: d6dfe2509da9 ("locking,arch,metag: Fold atomic_ops") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: linux-metag@vger.kernel.org
Diffstat (limited to 'arch/metag')
-rw-r--r--arch/metag/include/asm/atomic_lnkget.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/metag/include/asm/atomic_lnkget.h b/arch/metag/include/asm/atomic_lnkget.h
index a625818..88fa25f 100644
--- a/arch/metag/include/asm/atomic_lnkget.h
+++ b/arch/metag/include/asm/atomic_lnkget.h
@@ -61,7 +61,7 @@ static inline int atomic_##op##_return(int i, atomic_t *v) \
" CMPT %0, #HI(0x02000000)\n" \
" BNZ 1b\n" \
: "=&d" (temp), "=&da" (result) \
- : "da" (&v->counter), "bd" (i) \
+ : "da" (&v->counter), "br" (i) \
: "cc"); \
\
smp_mb(); \