From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F38D63148BF; Sat, 19 Sep 2026 00:31:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789777892; cv=none; b=fRBHfbPvVZgwxBTdtFbAw4ljkwMRsttzCRuoNgqNb/V2l9AGqgauRaQ5CKtVJjfEBLjz+Bgy9ZvvC708/8iHgPBz0kp+C+VaSCru26IR28z59PkO9lW+2apW9EF7n1LhxJRBLFdV2CETE2ODk/WXWP4OF69ydkJqnLftx1am6Nk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789777892; c=relaxed/simple; bh=3DgBImPgnlWwQJmWws6ASYK+GxGwIsaqI1s9nQVOvFQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jhg1kamdYyho/bP+ztKUw1jGg7mAzf3Gn9yz8Uus3JLQhZ9XTcL3wqmOOAuKjttGJEOoKekpDr8Rk1gejvwaBTwJxn31U/7dlAFn5t4vcXCjseGy1kYyengJWjetG7UsgRtYxsadh1lKMJwWZiu9/SFRiMktO3bNjpWpigYpuoU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=rVb9+TJN; arc=none smtp.client-ip=213.97.179.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="rVb9+TJN" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Cc:To:Message-Id:Content-Transfer-Encoding:Content-Type: MIME-Version:Subject:Date:From:From:Reply-To; bh=yZ3DKzOukGqoG/GxXFh53hvF+kqeXZoFNQjmOm5tAX4=; b=rVb9+TJNOO/+5Y+GC6Et1HzLXb xVOZFhyB3aEu5DH6j1QwyvX00dAwDYxyRtmhHqIP4oEonNmKiNkyXdbsiAW6uxSLFiVnmm1TWwuYi E9DFEfHkp6Gq6v9Io9ds+86CuRDrWJiWMyJNA283I6nojbo8B+QvKXf4P1x23m2izR0uszAQRnOPF bi2ls+DFXnIm73dvDyfcOsDWL2YXatNg7zbLTcdaX+v8IK9OLoaSkarB/xa5l/+WTo0avzheYdE4i NLHTBPUkGgBdWSjJuQfX51sZfuSLuCI7K9GmwRn2dwU7mieohgpU3cZqCw9yLBdnaVozR0IUcY4+9 h5I0vniA==; Received: from [177.172.123.214] (helo=[192.168.15.100]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1x7izF-004Bwz-OC; Sat, 19 Sep 2026 02:31:25 +0200 From: =?utf-8?q?Andr=C3=A9_Almeida?= Date: Fri, 18 Sep 2026 21:31:11 -0300 Subject: [PATCH v8 04/12] s390: Use the common syscall table Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20260918-tonyk-syscall_table-v8-4-0e2d60cad13e@igalia.com> References: <20260918-tonyk-syscall_table-v8-0-0e2d60cad13e@igalia.com> In-Reply-To: <20260918-tonyk-syscall_table-v8-0-0e2d60cad13e@igalia.com> To: Masami Hiramatsu , Arnd Bergmanon Cc: Christian Brauner , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, kernel-dev@igalia.com, Thomas Bogendoerfer , linux-alpha@vger.kernel.org, linux-s390@vger.kernel.org, linux-arm-kernel@lists.infradead.org, soc@lists.linux.dev, linux-mips@vger.kernel.org, sparclinux@vger.kernel.org, =?utf-8?q?Andr=C3=A9_Almeida?= X-Mailer: b4 0.15.2 Remove some of the duplicated code by using the common syscall number table. Signed-off-by: André Almeida --- arch/s390/kernel/syscall.c | 2 ++ arch/s390/kernel/syscalls/Makefile | 12 ++++++--- arch/s390/kernel/syscalls/syscall.tbl | 49 ----------------------------------- 3 files changed, 10 insertions(+), 53 deletions(-) diff --git a/arch/s390/kernel/syscall.c b/arch/s390/kernel/syscall.c index bcc0b76bd868..d4b5c30e1cbe 100644 --- a/arch/s390/kernel/syscall.c +++ b/arch/s390/kernel/syscall.c @@ -40,6 +40,8 @@ #include "entry.h" +#define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, native) + #define __SYSCALL(nr, sym) long __s390x_##sym(struct pt_regs *); #include #undef __SYSCALL diff --git a/arch/s390/kernel/syscalls/Makefile b/arch/s390/kernel/syscalls/Makefile index d5fca0ca0890..4b4490f80467 100644 --- a/arch/s390/kernel/syscalls/Makefile +++ b/arch/s390/kernel/syscalls/Makefile @@ -5,19 +5,23 @@ uapi := arch/$(SRCARCH)/include/generated/uapi/asm $(shell mkdir -p $(uapi) $(kapi)) syscall := $(src)/syscall.tbl +syscalltbl_common := $(srctree)/scripts/syscall_common.tbl syshdr := $(srctree)/scripts/syscallhdr.sh systbl := $(srctree)/scripts/syscalltbl.sh +abis := common,clone3,memfd_secret quiet_cmd_syshdr = SYSHDR $@ - cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --emit-nr --abis common,$* $< $@ + cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --emit-nr --abis $(abis),$* \ + --common-tbl $(syscalltbl_common) $< $@ quiet_cmd_systbl = SYSTBL $@ - cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis common,$* $< $@ + cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis $(abis),$* \ + --common-tbl $(syscalltbl_common) $< $@ -$(uapi)/unistd_%.h: $(syscall) $(syshdr) FORCE +$(uapi)/unistd_%.h: $(syscall) $(syscalltbl_common) $(syshdr) FORCE $(call if_changed,syshdr) -$(kapi)/syscall_table.h: $(syscall) $(systbl) FORCE +$(kapi)/syscall_table.h: $(syscall) $(syscalltbl_common) $(systbl) FORCE $(call if_changed,systbl) uapisyshdr-y += unistd_64.h diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl index 1b45e68a217b..ce6d15260dd1 100644 --- a/arch/s390/kernel/syscalls/syscall.tbl +++ b/arch/s390/kernel/syscalls/syscall.tbl @@ -350,52 +350,3 @@ 400 common msgsnd sys_msgsnd 401 common msgrcv sys_msgrcv 402 common msgctl sys_msgctl -424 common pidfd_send_signal sys_pidfd_send_signal -425 common io_uring_setup sys_io_uring_setup -426 common io_uring_enter sys_io_uring_enter -427 common io_uring_register sys_io_uring_register -428 common open_tree sys_open_tree -429 common move_mount sys_move_mount -430 common fsopen sys_fsopen -431 common fsconfig sys_fsconfig -432 common fsmount sys_fsmount -433 common fspick sys_fspick -434 common pidfd_open sys_pidfd_open -435 common clone3 sys_clone3 -436 common close_range sys_close_range -437 common openat2 sys_openat2 -438 common pidfd_getfd sys_pidfd_getfd -439 common faccessat2 sys_faccessat2 -440 common process_madvise sys_process_madvise -441 common epoll_pwait2 sys_epoll_pwait2 -442 common mount_setattr sys_mount_setattr -443 common quotactl_fd sys_quotactl_fd -444 common landlock_create_ruleset sys_landlock_create_ruleset -445 common landlock_add_rule sys_landlock_add_rule -446 common landlock_restrict_self sys_landlock_restrict_self -447 common memfd_secret sys_memfd_secret -448 common process_mrelease sys_process_mrelease -449 common futex_waitv sys_futex_waitv -450 common set_mempolicy_home_node sys_set_mempolicy_home_node -451 common cachestat sys_cachestat -452 common fchmodat2 sys_fchmodat2 -453 common map_shadow_stack sys_map_shadow_stack -454 common futex_wake sys_futex_wake -455 common futex_wait sys_futex_wait -456 common futex_requeue sys_futex_requeue -457 common statmount sys_statmount -458 common listmount sys_listmount -459 common lsm_get_self_attr sys_lsm_get_self_attr -460 common lsm_set_self_attr sys_lsm_set_self_attr -461 common lsm_list_modules sys_lsm_list_modules -462 common mseal sys_mseal -463 common setxattrat sys_setxattrat -464 common getxattrat sys_getxattrat -465 common listxattrat sys_listxattrat -466 common removexattrat sys_removexattrat -467 common open_tree_attr sys_open_tree_attr -468 common file_getattr sys_file_getattr -469 common file_setattr sys_file_setattr -470 common listns sys_listns -471 common rseq_slice_yield sys_rseq_slice_yield -472 common fchroot sys_fchroot -- 2.55.0