linux-stable/arch/s390
Heiko Carstens 5c12187386 s390/preempt: disable __preempt_count_add() optimization for PROFILE_ALL_BRANCHES
[ Upstream commit 63678eecec ]

gcc 12 does not (always) optimize away code that should only be generated
if parameters are constant and within in a certain range. This depends on
various obscure kernel config options, however in particular
PROFILE_ALL_BRANCHES can trigger this compile error:

In function ‘__atomic_add_const’,
    inlined from ‘__preempt_count_add.part.0’ at ./arch/s390/include/asm/preempt.h:50:3:
./arch/s390/include/asm/atomic_ops.h:80:9: error: impossible constraint in ‘asm’
   80 |         asm volatile(                                                   \
      |         ^~~

Workaround this by simply disabling the optimization for
PROFILE_ALL_BRANCHES, since the kernel will be so slow, that this
optimization won't matter at all.

Reported-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:25:25 +02:00
..
appldata
boot arch: decompressor: remove useless vmlinux.bin.all-y 2022-01-14 02:55:44 +09:00
configs s390: update defconfigs 2022-01-24 09:10:59 +01:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2022-01-11 10:21:35 -08:00
hypfs s390/hypfs: include z/VM guests with access control group set 2022-01-26 18:42:39 +01:00
include s390/preempt: disable __preempt_count_add() optimization for PROFILE_ALL_BRANCHES 2022-06-09 10:25:25 +02:00
kernel s390/traps: improve panic message for translation-specification exception 2022-05-25 09:59:00 +02:00
kvm KVM: s390x: fix SCK locking 2022-04-08 13:57:30 +02:00
lib s390/module: fix building test_modules_helpers.o with clang 2022-02-06 23:30:37 +01:00
mm Merge branch 'akpm' (patches from Andrew) 2022-01-15 20:37:06 +02:00
net bpf: Change value of MAX_TAIL_CALL_CNT from 32 to 33 2021-11-16 14:03:15 +01:00
pci s390/pci: improve zpci_dev reference counting 2022-05-25 09:59:00 +02:00
purgatory s390: enable KCSAN 2021-07-30 17:09:23 +02:00
tools s390/disassembler: update opcode table 2021-12-16 19:58:07 +01:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig s390/module: test loading modules with a lot of relocations 2022-01-24 09:10:59 +01:00
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Makefile s390: disable -Warray-bounds 2022-05-18 10:28:17 +02:00