From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2009DC982DB for ; Thu, 17 Sep 2026 23:46:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yZ3DKzOukGqoG/GxXFh53hvF+kqeXZoFNQjmOm5tAX4=; b=ItooptOvW2KrcZf8qVbLoZY2sf BdIjFHsyItC35ulwxrFgphUs9rJjLCM3RU1Gn4LHZZTMcHNOQaxLuslBAnadNJxsDLR5I0BTpB2ts 8F+Yvgn6HvSFabr32wNeHKHnyWip9eRCyJF1FhmsLoFouovD7BUAwWegJntwgaXsDfWbttFssg0D7 wmVBS+kNbh5zPa2/HlxMtv2v/b3Q00lfw5JemzGqwve7/3CLhEx0egy5Nn5d3iYh1avs3kEpgIsh0 t2sKZe60kFNgscVDYp4fQH8P30IPR7OXhJdDeWWWohRFSvLmX++Ec/hy2vRA9N8w6+o7FR9YxDfmV SjTFgdDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x7LoW-0000000CxN4-3G6I; Thu, 17 Sep 2026 23:46:48 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x7LoP-0000000CxJQ-2Shj for linux-arm-kernel@bombadil.infradead.org; Thu, 17 Sep 2026 23:46:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=yZ3DKzOukGqoG/GxXFh53hvF+kqeXZoFNQjmOm5tAX4=; b=Yh1MOGcUj7uXmHZzgB8AS4jfWr K7FzdlZqcypFsVRMqI8EOhBfqxAWeKSJlFc/rrBXZrRzh/RBEDEJ4MYdfb0qrNNDMvwa4Au+oDcKi UyqyftJd3vcSgFdtkX2iFf47ef9/m7vNsMXGX6lOLJWCFAKMvGQwmina8Ao3qlCP70Y6U+uVpR5jV gZ98i5gT6jJ5uZfIlONyWyGD/UWCRNY1TE1WklJAsUHBHa8yRopwNvpgz5Jbt001BIQx7X4a1UieO JyskJ0+XaOTYd9FG014UEgmCtb93bZTBJC3Qo6UlkYp72T3/z0cMI+AhqfWlK7c40sOX6FHoR5GHV QbA47PGQ==; Received: from fanzine2.igalia.com ([213.97.179.56]) by desiato.infradead.org with esmtps (Exim 4.99.2 #2 (Red Hat Linux)) id 1x7LoM-00000009Oa3-3u3l for linux-arm-kernel@lists.infradead.org; Thu, 17 Sep 2026 23:46:40 +0000 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=KGO43MUqqvZ7ShZgbTFIZg4sAl EQoHpHo4EiriyhHd3dULAHSuZiDbXh3ABL/YESs2VS4Hw9UsHnnOS/2e0xvOtPjdqSKixDy1EKSJL aPgtADcO9OMPLHsxm7MzLOkPHWCkWqq14+UpmHAcHWhpkUhzVfN2YLpYSLBXdPrXtZgJzJNkUYAfK CSilI8SlucAKLmHpfe97O2E1FOWol35snfAFX31pb9uu8QcVSCMrncqEuhE1KcZiS19FrrZCRexNI E3KOcYriTUj9PvHkhWR8QKv/tThBy9It2boAXPH5VK+tytem7cYbssnmT48L9HrFyLkZDpizVa4Ut zmW9Sw2A==; 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 1x7LoH-003hU7-Nz; Fri, 18 Sep 2026 01:46:33 +0200 From: =?utf-8?q?Andr=C3=A9_Almeida?= Date: Thu, 17 Sep 2026 20:46:08 -0300 Subject: [PATCH v7 05/13] s390: Use the common syscall table MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20260917-tonyk-syscall_table-v7-5-f4cd8f8e3265@igalia.com> References: <20260917-tonyk-syscall_table-v7-0-f4cd8f8e3265@igalia.com> In-Reply-To: <20260917-tonyk-syscall_table-v7-0-f4cd8f8e3265@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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260918_004639_045698_BAF5AEF3 X-CRM114-Status: UNSURE ( 7.03 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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