tools: Remove s390 compat support

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>
This commit is contained in:
Heiko Carstens 2025-11-10 19:54:36 +01:00
parent 7afb095df3
commit 169ebcbb90
9 changed files with 2 additions and 69 deletions

View File

@ -2,11 +2,7 @@
#ifndef __ASM_S390_BITSPERLONG_H #ifndef __ASM_S390_BITSPERLONG_H
#define __ASM_S390_BITSPERLONG_H #define __ASM_S390_BITSPERLONG_H
#ifndef __s390x__
#define __BITS_PER_LONG 32
#else
#define __BITS_PER_LONG 64 #define __BITS_PER_LONG 64
#endif
#include <asm-generic/bitsperlong.h> #include <asm-generic/bitsperlong.h>

View File

@ -143,13 +143,8 @@
void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _start(void) void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _start(void)
{ {
__asm__ volatile ( __asm__ volatile (
#ifdef __s390x__
"lgr %r2, %r15\n" /* save stack pointer to %r2, as arg1 of _start_c */ "lgr %r2, %r15\n" /* save stack pointer to %r2, as arg1 of _start_c */
"aghi %r15, -160\n" /* allocate new stackframe */ "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 */ "xc 0(8,%r15), 0(%r15)\n" /* clear backchain */
"brasl %r14, _start_c\n" /* transfer to c runtime */ "brasl %r14, _start_c\n" /* transfer to c runtime */
); );

View File

@ -27,7 +27,7 @@
#include "arch-powerpc.h" #include "arch-powerpc.h"
#elif defined(__riscv) #elif defined(__riscv)
#include "arch-riscv.h" #include "arch-riscv.h"
#elif defined(__s390x__) || defined(__s390__) #elif defined(__s390x__)
#include "arch-s390.h" #include "arch-s390.h"
#elif defined(__loongarch__) #elif defined(__loongarch__)
#include "arch-loongarch.h" #include "arch-loongarch.h"

View File

@ -11325,8 +11325,6 @@ static const char *arch_specific_syscall_pfx(void)
return "ia32"; return "ia32";
#elif defined(__s390x__) #elif defined(__s390x__)
return "s390x"; return "s390x";
#elif defined(__s390__)
return "s390";
#elif defined(__arm__) #elif defined(__arm__)
return "arm"; return "arm";
#elif defined(__aarch64__) #elif defined(__aarch64__)
@ -12113,8 +12111,6 @@ static const char *arch_specific_lib_paths(void)
return "/lib/i386-linux-gnu"; return "/lib/i386-linux-gnu";
#elif defined(__s390x__) #elif defined(__s390x__)
return "/lib/s390x-linux-gnu"; return "/lib/s390x-linux-gnu";
#elif defined(__s390__)
return "/lib/s390-linux-gnu";
#elif defined(__arm__) && defined(__SOFTFP__) #elif defined(__arm__) && defined(__SOFTFP__)
return "/lib/arm-linux-gnueabi"; return "/lib/arm-linux-gnueabi";
#elif defined(__arm__) && !defined(__SOFTFP__) #elif defined(__arm__) && !defined(__SOFTFP__)

View File

@ -1376,8 +1376,6 @@ static int parse_usdt_arg(const char *arg_str, int arg_num, struct usdt_arg_spec
#elif defined(__s390x__) #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) static int parse_usdt_arg(const char *arg_str, int arg_num, struct usdt_arg_spec *arg, int *arg_sz)
{ {
unsigned int reg; unsigned int reg;

View File

@ -87,7 +87,6 @@ IMAGE_riscv = arch/riscv/boot/Image
IMAGE_riscv32 = arch/riscv/boot/Image IMAGE_riscv32 = arch/riscv/boot/Image
IMAGE_riscv64 = arch/riscv/boot/Image IMAGE_riscv64 = arch/riscv/boot/Image
IMAGE_s390x = arch/s390/boot/bzImage IMAGE_s390x = arch/s390/boot/bzImage
IMAGE_s390 = arch/s390/boot/bzImage
IMAGE_loongarch = arch/loongarch/boot/vmlinuz.efi IMAGE_loongarch = arch/loongarch/boot/vmlinuz.efi
IMAGE_sparc32 = arch/sparc/boot/image IMAGE_sparc32 = arch/sparc/boot/image
IMAGE_sparc64 = arch/sparc/boot/image IMAGE_sparc64 = arch/sparc/boot/image
@ -117,7 +116,6 @@ DEFCONFIG_riscv = defconfig
DEFCONFIG_riscv32 = rv32_defconfig DEFCONFIG_riscv32 = rv32_defconfig
DEFCONFIG_riscv64 = defconfig DEFCONFIG_riscv64 = defconfig
DEFCONFIG_s390x = defconfig DEFCONFIG_s390x = defconfig
DEFCONFIG_s390 = defconfig compat.config
DEFCONFIG_loongarch = defconfig DEFCONFIG_loongarch = defconfig
DEFCONFIG_sparc32 = sparc32_defconfig DEFCONFIG_sparc32 = sparc32_defconfig
DEFCONFIG_sparc64 = sparc64_defconfig DEFCONFIG_sparc64 = sparc64_defconfig
@ -156,7 +154,6 @@ QEMU_ARCH_riscv = riscv64
QEMU_ARCH_riscv32 = riscv32 QEMU_ARCH_riscv32 = riscv32
QEMU_ARCH_riscv64 = riscv64 QEMU_ARCH_riscv64 = riscv64
QEMU_ARCH_s390x = s390x QEMU_ARCH_s390x = s390x
QEMU_ARCH_s390 = s390x
QEMU_ARCH_loongarch = loongarch64 QEMU_ARCH_loongarch = loongarch64
QEMU_ARCH_sparc32 = sparc QEMU_ARCH_sparc32 = sparc
QEMU_ARCH_sparc64 = sparc64 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_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_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_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_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_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=%)" 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_ppc64 = -m64 -mbig-endian -mno-vsx $(call cc-option,-mmultiple)
CFLAGS_ppc64le = -m64 -mlittle-endian -mno-vsx $(call cc-option,-mabi=elfv2) CFLAGS_ppc64le = -m64 -mlittle-endian -mno-vsx $(call cc-option,-mabi=elfv2)
CFLAGS_s390x = -m64 CFLAGS_s390x = -m64
CFLAGS_s390 = -m31
CFLAGS_mips32le = -EL -mabi=32 -fPIC CFLAGS_mips32le = -EL -mabi=32 -fPIC
CFLAGS_mips32be = -EB -mabi=32 CFLAGS_mips32be = -EB -mabi=32
CFLAGS_mipsn32le = -EL -mabi=n32 -fPIC -march=mips64r2 CFLAGS_mipsn32le = -EL -mabi=n32 -fPIC -march=mips64r2

View File

@ -23,7 +23,7 @@ all_archs=(
mips32le mips32be mipsn32le mipsn32be mips64le mips64be mips32le mips32be mipsn32le mipsn32be mips64le mips64be
ppc ppc64 ppc64le ppc ppc64 ppc64le
riscv32 riscv64 riscv32 riscv64
s390x s390 s390x
loongarch loongarch
sparc32 sparc64 sparc32 sparc64
m68k m68k
@ -185,10 +185,6 @@ test_arch() {
exit 1 exit 1
esac esac
printf '%-15s' "$arch:" 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 if [ "$arch" = "m68k" -o "$arch" = "sh4" ] && [ "$llvm" = "1" ]; then
echo "Unsupported configuration" echo "Unsupported configuration"
return return

View File

@ -28,8 +28,6 @@ do { \
RSEQ_WRITE_ONCE(*(p), v); \ RSEQ_WRITE_ONCE(*(p), v); \
} while (0) } while (0)
#ifdef __s390x__
#define LONG_L "lg" #define LONG_L "lg"
#define LONG_S "stg" #define LONG_S "stg"
#define LONG_LT_R "ltgr" #define LONG_LT_R "ltgr"
@ -63,43 +61,6 @@ do { \
".quad " __rseq_str(start_ip) ", " __rseq_str(exit_ip) "\n\t" \ ".quad " __rseq_str(start_ip) ", " __rseq_str(exit_ip) "\n\t" \
".popsection\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) \ #define RSEQ_ASM_DEFINE_TABLE(label, start_ip, post_commit_ip, abort_ip) \
__RSEQ_ASM_DEFINE_TABLE(label, 0x0, 0x0, start_ip, \ __RSEQ_ASM_DEFINE_TABLE(label, 0x0, 0x0, start_ip, \
(post_commit_ip - start_ip), abort_ip) (post_commit_ip - start_ip), abort_ip)

View File

@ -25,10 +25,6 @@
#define VDSO_VERSION 1 #define VDSO_VERSION 1
#define VDSO_NAMES 0 #define VDSO_NAMES 0
#define VDSO_32BIT 1 #define VDSO_32BIT 1
#elif defined (__s390__) && !defined(__s390x__)
#define VDSO_VERSION 2
#define VDSO_NAMES 0
#define VDSO_32BIT 1
#elif defined (__s390x__) #elif defined (__s390x__)
#define VDSO_VERSION 2 #define VDSO_VERSION 2
#define VDSO_NAMES 0 #define VDSO_NAMES 0