s390/atomic,cmpxchg: make constraints work with old compilers
authorHeiko Carstens <hca@linux.ibm.com>
Tue, 13 Apr 2021 13:30:32 +0000 (15:30 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Thu, 15 Apr 2021 15:47:42 +0000 (17:47 +0200)
commit3e5ee32392efd00399d038cdad07478237d9a9f1
tree0b7eea217a639bf14d28cb3966fd9c303b836809
parent5d8da6951ee2b2f7785ead62f785f3b3dd254104
s390/atomic,cmpxchg: make constraints work with old compilers

Old gcc versions may fail with an internal compiler error if only the
T or S constraint is specified for an operand, and no displacement is
needed at all.

To fix this use RT and QS as constraints, which reflects the union of
both. Later gcc versions do the right thing and always accept single T
and S constraints.
See gcc commit 3e4be43f69da ("S/390: Memory constraint cleanup").

Fixes: ca897bb1814f ("s390/atomic: use proper constraints")
Fixes: b23eb636d7f9 ("s390/atomic: get rid of gcc atomic builtins")
Fixes: d2b1f6d2d350 ("s390/cmpxchg: get rid of gcc atomic builtins")
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/asm/atomic_ops.h
arch/s390/include/asm/cmpxchg.h