]> git.baikalelectronics.ru Git - kernel.git/commit
metag: Fix atomic_*_return inline asm constraints
authorJames Hogan <james.hogan@imgtec.com>
Tue, 3 May 2016 08:11:21 +0000 (09:11 +0100)
committerJames Hogan <james.hogan@imgtec.com>
Tue, 3 May 2016 08:25:46 +0000 (09:25 +0100)
commitbc9e5518b0a2970851272d7fbef27fbef31e850a
treee6051225686d798abd3e841f6575c6a920ce1a14
parentc14e8569bcac589f182ef6e5c52b1533801cfa00
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: ad8532899382 ("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
arch/metag/include/asm/atomic_lnkget.h