aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/lib/spinlock.c
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2022-05-06 11:33:19 +0200
committerHeiko Carstens <hca@linux.ibm.com>2022-05-11 14:40:58 +0200
commit63678eecec57fc51b778be3da35a397931287170 (patch)
treebcb49f8eb4c0824719baec46ce380bbc0e5c8cd6 /arch/s390/lib/spinlock.c
parents390/stp: clock_delta should be signed (diff)
downloadlinux-dev-63678eecec57fc51b778be3da35a397931287170.tar.xz
linux-dev-63678eecec57fc51b778be3da35a397931287170.zip
s390/preempt: disable __preempt_count_add() optimization for PROFILE_ALL_BRANCHES
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>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions