]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
tools: Remove s390 compat support
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 10 Nov 2025 18:54:36 +0000 (19:54 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Mon, 17 Nov 2025 10:10:38 +0000 (11:10 +0100)
Remove s390 compat support from everything within tools, since s390 compat
support will be removed from the kernel.

Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Weißschuh <linux@weissschuh.net> # tools/nolibc selftests/nolibc
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net> # selftests/vDSO
Acked-by: Alexei Starovoitov <ast@kernel.org> # bpf bits
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
tools/arch/s390/include/uapi/asm/bitsperlong.h
tools/include/nolibc/arch-s390.h
tools/include/nolibc/arch.h
tools/lib/bpf/libbpf.c
tools/lib/bpf/usdt.c
tools/testing/selftests/nolibc/Makefile.nolibc
tools/testing/selftests/nolibc/run-tests.sh
tools/testing/selftests/rseq/rseq-s390.h
tools/testing/selftests/vDSO/vdso_config.h

index d2bb620119bf3c2258e61aef890644bd0a52aa09..a226a1686a530dbbc01a3a7800b4d0894e4e7e92 100644 (file)
@@ -2,11 +2,7 @@
 #ifndef __ASM_S390_BITSPERLONG_H
 #define __ASM_S390_BITSPERLONG_H
 
-#ifndef __s390x__
-#define __BITS_PER_LONG 32
-#else
 #define __BITS_PER_LONG 64
-#endif
 
 #include <asm-generic/bitsperlong.h>
 
index df4c3cc713accd45551e07e1f02d3638e49e300e..0a39bee261b9faca20695f10000efff6defc38aa 100644 (file)
 void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _start(void)
 {
        __asm__ volatile (
-#ifdef __s390x__
                "lgr    %r2, %r15\n"          /* save stack pointer to %r2, as arg1 of _start_c */
                "aghi   %r15, -160\n"         /* allocate new stackframe                        */
-#else
-               "lr     %r2, %r15\n"
-               "ahi    %r15, -96\n"
-#endif
                "xc     0(8,%r15), 0(%r15)\n" /* clear backchain                                */
                "brasl  %r14, _start_c\n"     /* transfer to c runtime                          */
        );
index 426c89198135564acca44c485e5c2d8ba36a6fe9..ef4743aad188090c781d2d772c5053d649516301 100644 (file)
@@ -27,7 +27,7 @@
 #include "arch-powerpc.h"
 #elif defined(__riscv)
 #include "arch-riscv.h"
-#elif defined(__s390x__) || defined(__s390__)
+#elif defined(__s390x__)
 #include "arch-s390.h"
 #elif defined(__loongarch__)
 #include "arch-loongarch.h"
index dd3b2f57082d2def510bfa8eb49017bf4bb651a8..85abc357da315b9f0f30725956a56c84964c6296 100644 (file)
@@ -11325,8 +11325,6 @@ static const char *arch_specific_syscall_pfx(void)
        return "ia32";
 #elif defined(__s390x__)
        return "s390x";
-#elif defined(__s390__)
-       return "s390";
 #elif defined(__arm__)
        return "arm";
 #elif defined(__aarch64__)
@@ -12113,8 +12111,6 @@ static const char *arch_specific_lib_paths(void)
        return "/lib/i386-linux-gnu";
 #elif defined(__s390x__)
        return "/lib/s390x-linux-gnu";
-#elif defined(__s390__)
-       return "/lib/s390-linux-gnu";
 #elif defined(__arm__) && defined(__SOFTFP__)
        return "/lib/arm-linux-gnueabi";
 #elif defined(__arm__) && !defined(__SOFTFP__)
index c174b40866738a5580d383fe732833dcf0d28c13..d1524f6f54aeca955e52dfd3de0daaf96fae4350 100644 (file)
@@ -1376,8 +1376,6 @@ static int parse_usdt_arg(const char *arg_str, int arg_num, struct usdt_arg_spec
 
 #elif defined(__s390x__)
 
-/* Do not support __s390__ for now, since user_pt_regs is broken with -m31. */
-
 static int parse_usdt_arg(const char *arg_str, int arg_num, struct usdt_arg_spec *arg, int *arg_sz)
 {
        unsigned int reg;
index 330e000baeb1db578ae08f8c4a085d5ee97910e5..9416ae952e180b893d69c3ebc12ea8b2b6c4c1d5 100644 (file)
@@ -87,7 +87,6 @@ IMAGE_riscv      = arch/riscv/boot/Image
 IMAGE_riscv32    = arch/riscv/boot/Image
 IMAGE_riscv64    = arch/riscv/boot/Image
 IMAGE_s390x      = arch/s390/boot/bzImage
-IMAGE_s390       = arch/s390/boot/bzImage
 IMAGE_loongarch  = arch/loongarch/boot/vmlinuz.efi
 IMAGE_sparc32    = arch/sparc/boot/image
 IMAGE_sparc64    = arch/sparc/boot/image
@@ -117,7 +116,6 @@ DEFCONFIG_riscv      = defconfig
 DEFCONFIG_riscv32    = rv32_defconfig
 DEFCONFIG_riscv64    = defconfig
 DEFCONFIG_s390x      = defconfig
-DEFCONFIG_s390       = defconfig compat.config
 DEFCONFIG_loongarch  = defconfig
 DEFCONFIG_sparc32    = sparc32_defconfig
 DEFCONFIG_sparc64    = sparc64_defconfig
@@ -156,7 +154,6 @@ QEMU_ARCH_riscv      = riscv64
 QEMU_ARCH_riscv32    = riscv32
 QEMU_ARCH_riscv64    = riscv64
 QEMU_ARCH_s390x      = s390x
-QEMU_ARCH_s390       = s390x
 QEMU_ARCH_loongarch  = loongarch64
 QEMU_ARCH_sparc32    = sparc
 QEMU_ARCH_sparc64    = sparc64
@@ -197,7 +194,6 @@ QEMU_ARGS_riscv      = -M virt -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_T
 QEMU_ARGS_riscv32    = -M virt -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)"
 QEMU_ARGS_riscv64    = -M virt -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)"
 QEMU_ARGS_s390x      = -M s390-ccw-virtio -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)"
-QEMU_ARGS_s390       = -M s390-ccw-virtio -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)"
 QEMU_ARGS_loongarch  = -M virt -append "console=ttyS0,115200 panic=-1 $(TEST:%=NOLIBC_TEST=%)"
 QEMU_ARGS_sparc32    = -M SS-5 -m 256M -append "console=ttyS0,115200 panic=-1 $(TEST:%=NOLIBC_TEST=%)"
 QEMU_ARGS_sparc64    = -M sun4u -append "console=ttyS0,115200 panic=-1 $(TEST:%=NOLIBC_TEST=%)"
@@ -223,7 +219,6 @@ CFLAGS_ppc = -m32 -mbig-endian -mno-vsx $(call cc-option,-mmultiple)
 CFLAGS_ppc64 = -m64 -mbig-endian -mno-vsx $(call cc-option,-mmultiple)
 CFLAGS_ppc64le = -m64 -mlittle-endian -mno-vsx $(call cc-option,-mabi=elfv2)
 CFLAGS_s390x = -m64
-CFLAGS_s390 = -m31
 CFLAGS_mips32le = -EL -mabi=32 -fPIC
 CFLAGS_mips32be = -EB -mabi=32
 CFLAGS_mipsn32le = -EL -mabi=n32 -fPIC -march=mips64r2
index e8af1fb505cf3573b4a6b37228dee764fe2e5277..210abe715ed9fba143c234f61cb69840a982152f 100755 (executable)
@@ -23,7 +23,7 @@ all_archs=(
        mips32le mips32be mipsn32le mipsn32be mips64le mips64be
        ppc ppc64 ppc64le
        riscv32 riscv64
-       s390x s390
+       s390x
        loongarch
        sparc32 sparc64
        m68k
@@ -185,10 +185,6 @@ test_arch() {
                        exit 1
        esac
        printf '%-15s' "$arch:"
-       if [ "$arch" = "s390" ] && ([ "$llvm" = "1" ] || [ "$test_mode" = "user" ]); then
-               echo "Unsupported configuration"
-               return
-       fi
        if [ "$arch" = "m68k" -o "$arch" = "sh4" ] && [ "$llvm" = "1" ]; then
                echo "Unsupported configuration"
                return
index 33baaa9f99979fb66555fcee147d194209e229ce..e7b858cd37363ef5098a5e731a92da1c99165605 100644 (file)
@@ -28,8 +28,6 @@ do {                                                                  \
        RSEQ_WRITE_ONCE(*(p), v);                                       \
 } while (0)
 
-#ifdef __s390x__
-
 #define LONG_L                 "lg"
 #define LONG_S                 "stg"
 #define LONG_LT_R              "ltgr"
@@ -63,43 +61,6 @@ do {                                                                 \
                ".quad " __rseq_str(start_ip) ", " __rseq_str(exit_ip) "\n\t" \
                ".popsection\n\t"
 
-#elif __s390__
-
-#define __RSEQ_ASM_DEFINE_TABLE(label, version, flags,                 \
-                               start_ip, post_commit_offset, abort_ip) \
-               ".pushsection __rseq_cs, \"aw\"\n\t"                    \
-               ".balign 32\n\t"                                        \
-               __rseq_str(label) ":\n\t"                               \
-               ".long " __rseq_str(version) ", " __rseq_str(flags) "\n\t" \
-               ".long 0x0, " __rseq_str(start_ip) ", 0x0, " __rseq_str(post_commit_offset) ", 0x0, " __rseq_str(abort_ip) "\n\t" \
-               ".popsection\n\t"                                       \
-               ".pushsection __rseq_cs_ptr_array, \"aw\"\n\t"          \
-               ".long 0x0, " __rseq_str(label) "b\n\t"                 \
-               ".popsection\n\t"
-
-/*
- * Exit points of a rseq critical section consist of all instructions outside
- * of the critical section where a critical section can either branch to or
- * reach through the normal course of its execution. The abort IP and the
- * post-commit IP are already part of the __rseq_cs section and should not be
- * explicitly defined as additional exit points. Knowing all exit points is
- * useful to assist debuggers stepping over the critical section.
- */
-#define RSEQ_ASM_DEFINE_EXIT_POINT(start_ip, exit_ip)                  \
-               ".pushsection __rseq_exit_point_array, \"aw\"\n\t"      \
-               ".long 0x0, " __rseq_str(start_ip) ", 0x0, " __rseq_str(exit_ip) "\n\t" \
-               ".popsection\n\t"
-
-#define LONG_L                 "l"
-#define LONG_S                 "st"
-#define LONG_LT_R              "ltr"
-#define LONG_CMP               "c"
-#define LONG_CMP_R             "cr"
-#define LONG_ADDI              "ahi"
-#define LONG_ADD_R             "ar"
-
-#endif
-
 #define RSEQ_ASM_DEFINE_TABLE(label, start_ip, post_commit_ip, abort_ip) \
        __RSEQ_ASM_DEFINE_TABLE(label, 0x0, 0x0, start_ip,              \
                                (post_commit_ip - start_ip), abort_ip)
index 5fdd0f36233742bc47ae79f23d2cfae5a0f56dee..50c261005111f67d6645c2e815f666f4b36619f5 100644 (file)
 #define VDSO_VERSION           1
 #define VDSO_NAMES             0
 #define VDSO_32BIT             1
-#elif defined (__s390__) && !defined(__s390x__)
-#define VDSO_VERSION           2
-#define VDSO_NAMES             0
-#define VDSO_32BIT             1
 #elif defined (__s390x__)
 #define VDSO_VERSION           2
 #define VDSO_NAMES             0