]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/atomic_ops: Disable flag outputs constraint for GCC versions below 14.2.0
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 22 Jul 2024 13:41:13 +0000 (15:41 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 23 Jul 2024 14:02:31 +0000 (16:02 +0200)
GCC may die with an ICE if the flag outputs constraint is used in
combination with other inline assemblies. This will be fixed with
GCC 14.2.0.

Therefore disable the use of the constraint for now.

Link: https://gcc.gnu.org/git?p=gcc.git;a=commit;h=cd11413ff7c4353a3e336db415304f788d23a393
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/atomic_ops.h

index 2b379d1d9046b9b927f3858481ae6003452b0193..742c7919cbcdc193b497b1fe90d7f0eeaeecd0d0 100644 (file)
@@ -188,7 +188,8 @@ static __always_inline long __atomic64_cmpxchg(long *ptr, long old, long new)
        return old;
 }
 
-#ifdef __GCC_ASM_FLAG_OUTPUTS__
+/* GCC versions before 14.2.0 may die with an ICE in some configurations. */
+#if defined(__GCC_ASM_FLAG_OUTPUTS__) && !(IS_ENABLED(CONFIG_CC_IS_GCC) && (GCC_VERSION < 140200))
 
 static __always_inline bool __atomic_cmpxchg_bool(int *ptr, int old, int new)
 {