OSDN Git Service

metag: Fix atomic_*_return inline asm constraints
authorJames Hogan <james.hogan@imgtec.com>
Tue, 3 May 2016 08:11:21 +0000 (09:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2016 06:27:54 +0000 (08:27 +0200)
commit73e6305cf0f89ee66abe522a75eb614212b1c8a2
tree5e1379d82f2bec0ce164752385d52d62faffe430
parent6f0caecda50f411841d9791e1fe54c30d33969b7
metag: Fix atomic_*_return inline asm constraints

commit 096a8b6d5e7ab9f8ca3d2474b3ca6a1fe79e0371 upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/metag/include/asm/atomic_lnkget.h