linux/arch
Heiko Carstens 30cf47a602 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-14 16:53:45 +02:00
..
alpha alpha: Declare virt_to_phys and virt_to_bus parameter as pointer to volatile 2021-10-06 15:05:07 +02:00
arc ARC: entry: fix syscall_trace_exit argument 2022-04-27 13:15:31 +02:00
arm ARM: 9197/1: spectre-bhb: fix loop8 sequence for Thumb2 2022-05-25 08:41:20 +02:00
arm64 arm64: module: remove (NOLOAD) from linker script 2022-04-20 09:08:30 +02:00
blackfin
c6x
cris
frv
h8300 h8300: fix PREEMPTION build, TI_PRE_COUNT undefined 2021-02-23 14:00:33 +01:00
hexagon hexagon: export raw I/O routines for modules 2021-11-26 11:40:40 +01:00
ia64 hugetlbfs: flush TLBs correctly after huge_pmd_unshare 2021-12-08 08:46:52 +01:00
m32r
m68k m68k: set a default value for MEMORY_RESERVE 2021-11-26 11:40:35 +01:00
metag
microblaze microblaze: Prevent the overflow of the start 2020-02-28 16:36:08 +01:00
mips MIPS: lantiq: check the return value of kzalloc() 2022-05-25 08:41:18 +02:00
mn10300
nios2 nios2: Make NIOS2_DTB_SOURCE_BOOL depend on !COMPILE_TEST 2021-11-02 18:25:12 +01:00
openrisc openrisc: don't printk() unconditionally 2021-09-22 11:45:26 +02:00
parisc parisc: Merge model and model name into one line in /proc/cpuinfo 2022-05-12 12:17:08 +02:00
powerpc powerpc/perf: Fix power9 event alternatives 2022-04-27 13:15:30 +02:00
s390 s390/preempt: disable __preempt_count_add() optimization for PROFILE_ALL_BRANCHES 2022-06-14 16:53:45 +02:00
score
sh mips,s390,sh,sparc: gup: Work around the "COW can break either way" issue 2022-01-27 09:01:01 +01:00
sparc mips,s390,sh,sparc: gup: Work around the "COW can break either way" issue 2022-01-27 09:01:01 +01:00
tile
um um: registers: Rename function names to avoid conflicts and build problems 2022-01-27 09:00:56 +01:00
unicore32
x86 ACPICA: Avoid cache flush inside virtual machines 2022-06-14 16:53:44 +02:00
xtensa ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP 2022-06-14 16:53:43 +02:00
.gitignore
Kconfig x86: Make ARCH_USE_MEMREMAP_PROT a generic Kconfig symbol 2021-12-22 09:17:59 +01:00