]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit3424e4659dde270c2b9ac87cc506d2b2296f3cba
tree0b7eea217a639bf14d28cb3966fd9c303b836809
parentc7172b34e3fb3f8ce5a8f95abab267123fb4d059
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: 393cc4e0800a ("s390/atomic: use proper constraints")
Fixes: e138f9fa1b0b ("s390/atomic: get rid of gcc atomic builtins")
Fixes: 8be7b8336d26 ("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