summaryrefslogtreecommitdiff
path: root/include/linux/bio.h
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2016-08-04 17:36:08 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-20 18:09:23 +0200
commit8660eadce2bafd16b2b2d0100190c5ac76519caf (patch)
treeb51b4435be5cb70d05527f5ad451c67da0b4d330 /include/linux/bio.h
parent84f8a24ade96a8c1499823b160a0591199cf9d12 (diff)
downloadlwn-8660eadce2bafd16b2b2d0100190c5ac76519caf.tar.gz
lwn-8660eadce2bafd16b2b2d0100190c5ac76519caf.zip
metag: Fix __cmpxchg_u32 asm constraint for CMP
commit 6154c187b97ee7513046bb4eb317a89f738f13ef upstream. The LNKGET based atomic sequence in __cmpxchg_u32 has slightly incorrect constraints for the return value which under certain circumstances can allow an address unit register to be used as the first operand of a CMP instruction. This isn't a valid instruction however as the encodings only allow a data unit to be specified. This would result in an assembler error like the following: Error: failed to assemble instruction: "CMP A0.2,D0Ar6" Fix by changing the constraint from "=&da" (assigned, early clobbered, data or address unit register) to "=&d" (data unit register only). The constraint for the second operand, "bd" (an op2 register where op1 is a data unit register and the instruction supports O2R) is already correct assuming the first operand is a data unit register. Other cases of CMP in inline asm have had their constraints checked, and appear to all be fine. Fixes: 6006c0d8ce94 ("metag: Atomics, locks and bitops") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-metag@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/bio.h')
0 files changed, 0 insertions, 0 deletions