linux/arch/s390
Heiko Carstens e9953b729b s390/boot: workaround llvm IAS bug
For at least the mvc and clc instructions llvm's integrated assembler can
generate incorrect code. In particular this happens with decompressor boot
code. The reason seems to be that relocations for the second displacement
of each instruction are at incorrect locations (-/+: gas vs llvm IAS):

mvc     __LC_IO_NEW_PSW(16),.Lnewpsw

results in

        4:      d2 0f 01 f0 00 00       mvc     496(16,%r0),0
-                       8: R_390_12     .head.text+0x10
+		       6: R_390_12     .head.text+0x10

and
clc     0(3,%r4),.L_hdr
results in

      258:      d5 02 40 00 00 00       clc     0(3,%r4),0
-                       25c: R_390_12   .head.text+0x324
+		       25a: R_390_12   .head.text+0x324

Workaround this by writing the code in a different way.

Tested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://github.com/llvm/llvm-project/issues/55411
Link: https://lore.kernel.org/r/20220511120532.2228616-7-hca@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2022-05-17 15:16:29 +02:00
..
appldata s390/appldata: use struct_size() helper 2020-06-29 16:32:34 +02:00
boot s390/boot: workaround llvm IAS bug 2022-05-17 15:16:29 +02:00
configs s390: enable CONFIG_HARDENED_USERCOPY in debug_defconfig 2022-04-12 11:56:08 +02:00
crypto s390/crypto: fix typos in comments 2022-05-06 20:45:13 +02:00
hypfs s390/hypfs: fix typos in comments 2022-05-06 20:45:13 +02:00
include s390/alternatives: remove padding generation code 2022-05-17 15:16:28 +02:00
kernel s390/entry: workaround llvm's IAS limitations 2022-05-17 15:16:28 +02:00
kvm s390/ptrace: move short psw definitions to ptrace header file 2022-05-06 20:45:15 +02:00
lib s390/alternatives: provide identical sized orginal/alternative sequences 2022-05-17 15:16:28 +02:00
mm s390/mmap: increase stack/mmap gap to 128MB 2022-04-25 13:54:14 +02:00
net s390: raise minimum supported machine generation to z10 2022-03-10 15:58:17 +01:00
pci s390/pci: add error record for CC 2 retries 2022-04-25 13:54:15 +02:00
purgatory s390/purgatory: workaround llvm's IAS limitations 2022-05-17 15:16:28 +02:00
tools s390: raise minimum supported machine generation to z10 2022-03-10 15:58:17 +01:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig s390: allow to compile with z16 optimizations 2022-04-06 13:08:50 +02:00
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Makefile s390: allow to compile with z16 optimizations 2022-04-06 13:08:50 +02:00