From nobody Thu Apr 9 17:59:12 2026 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 D26483BED38; Tue, 3 Mar 2026 17:53:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772560402; cv=none; b=nzfkURENu8VrHGTXUszHdxUlITef9e7WIauR3O4PeIdF6mCx8BkrMyEwlX4bf9OgmQy6z6g9Ba//Tuj8pZXH08KosNt2Se/4SmOPvft9xNIUUwmX3FCrcN/TuEcqUHI/6nXTGoAyiIg+xHq4iggnZOaQH4fkuHLApwZdL0dAwRo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772560402; c=relaxed/simple; bh=Aq9UnkgRNsW2rt0ZQw598mGXDJfQHqGHprMzz3wL4sc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XGV0gX1rZT61AsyX0tMbMLI0FIkIz4KrFMC3MDlzMEPFe588u34zxvCKQaqxKkw/XcvQ8ffTlmOcrhIQ9BgY12DQqWEIxXgvChWj1bgp9SXV8b+3P3h8lAxqWl9KrBMm1Sq2drJ3hw8ZpmfPoRCveyq5+ZOXP34MEmPdqlQL+CU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=MraP35Bc; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="MraP35Bc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1772560398; bh=Aq9UnkgRNsW2rt0ZQw598mGXDJfQHqGHprMzz3wL4sc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=MraP35BcBluwe6lKLj+b/nCwJM3n6PuN+n0QR9iBknTmXSbrCqebu+uVlnkUu9zkA CxKp4uHfJZ3WCWWxw+AYzmydqRYLMqcRHY0a75aQfx0fQOhd5eO9/5iu0qocPtv2n0 fqxVBNog5E54H3lG4i5VjdgYT8AdOm2mQk8J9alU= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Tue, 03 Mar 2026 18:53:12 +0100 Subject: [PATCH 1/3] checksyscalls: move path to reference table to a variable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260303-kbuild-missing-syscalls-v1-1-3b4d69b68c75@weissschuh.net> References: <20260303-kbuild-missing-syscalls-v1-0-3b4d69b68c75@weissschuh.net> In-Reply-To: <20260303-kbuild-missing-syscalls-v1-0-3b4d69b68c75@weissschuh.net> To: Arnd Bergmann , Thomas Bogendoerfer Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1772560397; l=878; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=Aq9UnkgRNsW2rt0ZQw598mGXDJfQHqGHprMzz3wL4sc=; b=Tw91EzsW5z0YzT4oFK04KaHpcYOo/IBci5OEz0BY/nDgtEyHYBzcKwUed2t0z1tRAd/bu++gh mR7C1o4swv8BLDGzZfpWdeXr060Vum3S4+zXOV6x5KGBTRH4jCJtbWO X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= An upcoming patch will need to reuse this path. Move it into a reusable variable. Signed-off-by: Thomas Wei=C3=9Fschuh --- scripts/checksyscalls.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh index 1e5d2eeb726d..9becaf8d7b78 100755 --- a/scripts/checksyscalls.sh +++ b/scripts/checksyscalls.sh @@ -10,6 +10,8 @@ # checksyscalls.sh gcc gcc-options # =20 +reference_table=3D"$(dirname $0)/../arch/x86/entry/syscalls/syscall_32.tbl" + ignore_list() { cat << EOF #include @@ -269,5 +271,5 @@ syscall_list() { done } =20 -(ignore_list && syscall_list $(dirname $0)/../arch/x86/entry/syscalls/sysc= all_32.tbl) | \ +(ignore_list && syscall_list ${reference_table}) | \ $* -Wno-error -Wno-unused-macros -E -x c - > /dev/null --=20 2.53.0 From nobody Thu Apr 9 17:59:12 2026 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 79E2E370D42; Tue, 3 Mar 2026 17:53:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772560401; cv=none; b=Hy12YWFXc+4GFoKPB4VnHfHNslb7Te+0Ggj5QzaZzRJm+vEhdzD18UhFxJXEFo+QWBOB8j0z6Pci2yUivHho8f6zqstn0mFFsHof4DvT3FosOaSNNImQT6Pmg197grnk6WHH/0/7kGfdl6zEy+sizOw/npUeREumUMrPCfSCXao= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772560401; c=relaxed/simple; bh=dduxJCgHweVxYiNvudg2ZsGjXC2SsrE2dgbU9AwUCbA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gAz8RUVk06IdUZVelvI/DatePrnY/TeS/WN12jaaioe0tRZIxcVvItXtfxy/gDnfJKwUZ1AAKyIj/xvkstJTS4SBpeF8fw3awc4MrG34mHhjRkDrxSUrGzqe9oJawVo/dihT2HzQ+9nP/evBLXY4YyD5GGrhBCi+WSoHI4JZQqA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=o84OkAdb; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="o84OkAdb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1772560398; bh=dduxJCgHweVxYiNvudg2ZsGjXC2SsrE2dgbU9AwUCbA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=o84OkAdb9vx4VQSS/Tcf6If0vWV/9Dhby2XG3OSExr1AF9C84wczQtxjQPss/4nEj m9gXJ/3S7Xibe/p1Mskkb3A1dmAjgryzNXceOczkhhlyPXJvjspCZWqHjMMbgLiDbz 2npTTQgdd8PUp5OUwEPsJI2CXFGUFQ8O/j9aNWEg= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Tue, 03 Mar 2026 18:53:13 +0100 Subject: [PATCH 2/3] checksyscalls: only run when necessary Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260303-kbuild-missing-syscalls-v1-2-3b4d69b68c75@weissschuh.net> References: <20260303-kbuild-missing-syscalls-v1-0-3b4d69b68c75@weissschuh.net> In-Reply-To: <20260303-kbuild-missing-syscalls-v1-0-3b4d69b68c75@weissschuh.net> To: Arnd Bergmann , Thomas Bogendoerfer Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1772560397; l=1897; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=dduxJCgHweVxYiNvudg2ZsGjXC2SsrE2dgbU9AwUCbA=; b=i1vpDrFMelbgPAQkwxb587YM6eBfGuE9YnAqlmSAnQcifyPWvcheHUPQ4fio5IjNZk9m3rGOY WaDAFCzsYFWD5YYNDdDnn1Z4uE2zfCYrQdKDLU+TaDaUxVB1BShTyar X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Currently checksyscalls.sh is unconditionally executed during each build. Most of these executions are unnecessary. Only run checksyscalls.sh if one of its inputs have changed. This new logic does not work for the multiple invocations done for MIPS. The effect is that checksyscalls.sh is still executed unconditionally. However this is not worse than before. Signed-off-by: Thomas Wei=C3=9Fschuh --- Kbuild | 12 +++++++++--- scripts/checksyscalls.sh | 5 +++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Kbuild b/Kbuild index 13324b4bbe23..515cc6a27477 100644 --- a/Kbuild +++ b/Kbuild @@ -47,12 +47,18 @@ $(rq-offsets-file): kernel/sched/rq-offsets.s FORCE =20 # Check for missing system calls =20 +missing-syscalls-file :=3D .tmp_missing-syscalls + +targets +=3D $(missing-syscalls-file) + quiet_cmd_syscalls =3D CALL $< - cmd_syscalls =3D $(CONFIG_SHELL) $< $(CC) $(c_flags) $(missing_sysca= lls_flags) + cmd_syscalls =3D DEPFILE=3D$(depfile) $(CONFIG_SHELL) $< $(CC) $(c_f= lags) $(missing_syscalls_flags); touch $@ + +$(missing-syscalls-file): scripts/checksyscalls.sh $(rq-offsets-file) FORCE + $(call if_changed_dep,syscalls) =20 PHONY +=3D missing-syscalls -missing-syscalls: scripts/checksyscalls.sh $(rq-offsets-file) - $(call cmd,syscalls) +missing-syscalls: $(missing-syscalls-file) =20 # Check the manual modification of atomic headers =20 diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh index 9becaf8d7b78..a6d0882f07e1 100755 --- a/scripts/checksyscalls.sh +++ b/scripts/checksyscalls.sh @@ -273,3 +273,8 @@ syscall_list() { =20 (ignore_list && syscall_list ${reference_table}) | \ $* -Wno-error -Wno-unused-macros -E -x c - > /dev/null + +# For fixdep +if [ -n "${DEPFILE}" ]; then + echo "${0}: ${0} ${reference_table}" >> "${DEPFILE}" +fi --=20 2.53.0 From nobody Thu Apr 9 17:59:12 2026 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 79D0531A053; Tue, 3 Mar 2026 17:53:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772560401; cv=none; b=fSTxgdrZQT+qycDoYNNIkvzADbnOrwjQqQDQjht9LBv2CjxrriVsdEk14NG3gx+ZjFn3TGCIK0xuENHRMZlqQjMKDud+DRpeLOnLjwRY5g4lTqkm78H5RqMjxsxCX3hCCAvkRwDSGsb46nq1pIF9S5PgHOm+74v5W00uJApwjx8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772560401; c=relaxed/simple; bh=AWPGSjlFGYCvM0Uf27Rjhu8lYH3auQ3CC8o4On5/Fg8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=O/HFdTGY/w21W0LHp/ZhqdKpeaKXBuy7sz5S1x3Akn9zP3UPnlHXRmgBdcFF3YEK2tcHS9aeIx1wgYb06JgJ0+5Xqq509fnh0CZjcjs03H/+YtIBM8uKdL/sQ2gNGiMMHTZr4UEDQOVwFyM7S7rKcbytR4r9Zd+VjHE/HAEHBU4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=p7yJoLvy; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="p7yJoLvy" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1772560398; bh=AWPGSjlFGYCvM0Uf27Rjhu8lYH3auQ3CC8o4On5/Fg8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=p7yJoLvyDWPub3EMiqd4JKUISc3h2PWgTRGaLkCr4AQnmYk23rPTglRNPaB0RkQLx 4hNL2vMEs3fN2NTn73uxEdt9l1d9yb+mXT72QRxIHpKnTzISck7qjE27IN9W1AWBsf vA/e0jNtXWZBvwcCCkQL/EVEpGrU/LJ3nfsp2MT0= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Tue, 03 Mar 2026 18:53:14 +0100 Subject: [PATCH 3/3] checksyscalls: move instance functionality into generic code Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260303-kbuild-missing-syscalls-v1-3-3b4d69b68c75@weissschuh.net> References: <20260303-kbuild-missing-syscalls-v1-0-3b4d69b68c75@weissschuh.net> In-Reply-To: <20260303-kbuild-missing-syscalls-v1-0-3b4d69b68c75@weissschuh.net> To: Arnd Bergmann , Thomas Bogendoerfer Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1772560397; l=1976; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=AWPGSjlFGYCvM0Uf27Rjhu8lYH3auQ3CC8o4On5/Fg8=; b=46aIxOK+uMDYJaJ3qyr4HAx3EkNfqgeB6K4h54PbKGJ6DK05YyqKNLvOvUUKL0JLTWBCGFT2E ueN0TLZFQ8bC04440XVHm8E31GVya6PKMJhmY43f/TQrzfBSYDJpxX6 X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= On MIPS the checksyscalls.sh script may be executed multiple times. Currently these multiple executions are executed on each build as kbuild see that the commands have changed each time. Use a dedicated stamp file for each different invocation to avoid the spurious executions. Signed-off-by: Thomas Wei=C3=9Fschuh --- Kbuild | 4 ++-- arch/mips/Makefile | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Kbuild b/Kbuild index 515cc6a27477..fb547bc5ff41 100644 --- a/Kbuild +++ b/Kbuild @@ -47,11 +47,11 @@ $(rq-offsets-file): kernel/sched/rq-offsets.s FORCE =20 # Check for missing system calls =20 -missing-syscalls-file :=3D .tmp_missing-syscalls +missing-syscalls-file :=3D .tmp_missing-syscalls$(missing_syscalls_instanc= e) =20 targets +=3D $(missing-syscalls-file) =20 -quiet_cmd_syscalls =3D CALL $< +quiet_cmd_syscalls =3D CALL $< $(if $(missing_syscalls_instance),for $(= missing_syscalls_instance)) cmd_syscalls =3D DEPFILE=3D$(depfile) $(CONFIG_SHELL) $< $(CC) $(c_f= lags) $(missing_syscalls_flags); touch $@ =20 $(missing-syscalls-file): scripts/checksyscalls.sh $(rq-offsets-file) FORCE diff --git a/arch/mips/Makefile b/arch/mips/Makefile index d9057e29bc62..6705fa5d9211 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -421,12 +421,10 @@ CLEAN_FILES +=3D vmlinux.32 vmlinux.64 =20 archprepare: ifdef CONFIG_MIPS32_N32 - @$(kecho) ' Checking missing-syscalls for N32' - $(Q)$(MAKE) $(build)=3D. missing-syscalls missing_syscalls_flags=3D"-mabi= =3Dn32" + $(Q)$(MAKE) $(build)=3D. missing-syscalls missing_syscalls_instance=3D"N3= 2" missing_syscalls_flags=3D"-mabi=3Dn32" endif ifdef CONFIG_MIPS32_O32 - @$(kecho) ' Checking missing-syscalls for O32' - $(Q)$(MAKE) $(build)=3D. missing-syscalls missing_syscalls_flags=3D"-mabi= =3D32" + $(Q)$(MAKE) $(build)=3D. missing-syscalls missing_syscalls_instance=3D"O3= 2" missing_syscalls_flags=3D"-mabi=3D32" endif =20 install: --=20 2.53.0