From nobody Fri Apr 3 10:24:45 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 DF6383F20F5; Tue, 24 Mar 2026 17:16:52 +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=1774372614; cv=none; b=ib67ZwCO41xLd4Au575jXSGZHONN9ZJrs2sGCaw/iLsxpuS4ftfG+rL8TLEFIUdnUhytqa5/kZaSk5l+TrTo39Hs6f6nJF1EmcuXLZwA28gO7mH2S5lwNVP8lPvQ0Q3u0JPudbGSdT9ZJDdUtEDHVu84s6k62Bw8fZ8FrAvPHyQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774372614; c=relaxed/simple; bh=Aq9UnkgRNsW2rt0ZQw598mGXDJfQHqGHprMzz3wL4sc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CxC/xlwFZYjn5MSd7um8ilgDaAUA+so/xm0H5Pa3eZZeam/jwQPGuuL3dhVxPtxHuYuhdEIM3GW9K3aLUfFcC9lJVmW70AWQh95vJwubhZPzj9V1EskookJNvqxmFpJYZyoiTVGuT6mOQBG5iP8logxgraiGxs87F3kTLl8FpgA= 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=aFpYz0gq; 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="aFpYz0gq" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1774372611; bh=Aq9UnkgRNsW2rt0ZQw598mGXDJfQHqGHprMzz3wL4sc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=aFpYz0gqC5drXtur6Tr4Vj0N2v9XqzZ6X9lBzjhI3MUOrzd29U0yNiDFqm+bHuK36 dDIMX7eorsQHu+tebUDVwon2P6bGxJaJoJK7Dp0o/x0zq47GH+7JjVADJbSlopSmK2 0loQhqvt1K6elZnJ2c7mMKdt+kQ28N6jMYD01jow= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Tue, 24 Mar 2026 18:16:45 +0100 Subject: [PATCH v2 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: <20260324-kbuild-missing-syscalls-v2-1-651b8beb0bfd@weissschuh.net> References: <20260324-kbuild-missing-syscalls-v2-0-651b8beb0bfd@weissschuh.net> In-Reply-To: <20260324-kbuild-missing-syscalls-v2-0-651b8beb0bfd@weissschuh.net> To: Arnd Bergmann , Thomas Bogendoerfer , Nathan Chancellor , Nicolas Schier Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-kbuild@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=1774372608; l=878; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=Aq9UnkgRNsW2rt0ZQw598mGXDJfQHqGHprMzz3wL4sc=; b=yRfsjU1B4IjJm+8YLDYD7rYLGbu+C89qQzw6XQpz9cytMWu9oaBfK+wWWEZW04Kg9JygESc/X lL0qQjgVGsMAnNxGpfVSngMQEcCRge0tod3NUVYMSYrf5OzoAToSbCL 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 Fri Apr 3 10:24:45 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 DDAB32FFFB8; Tue, 24 Mar 2026 17:16:52 +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=1774372614; cv=none; b=ovW+QBjlfTujEGqWtr1QUmHfOB+kW4CS+yr8/6OQAj75PMPZthlbEPAAk8cVsrrZoxwAz2XYUtLyOSaqoJMmkcfDtEVgGxRa7Otv9uguPfoF4zPoYMyVOqZ5K4dXbUTozYd6U25K/vsUr4pZUUohoR0TGWHUp9FUKdHNaoFN8HY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774372614; c=relaxed/simple; bh=dduxJCgHweVxYiNvudg2ZsGjXC2SsrE2dgbU9AwUCbA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ln4v5ut0WsFxKR6KLun/8wwT44g15QrO4vC7aci2dUaWHxFEfFLXlmLYA9aJqg6BiPcqD+qiBgf8v0CD7fUa9pX3HBm6ng602pDUylqe4LVPzJDjIJnFV423Rjyu9IPtUzI+1qHTyh6qF0PXHQXsp4BSQ4VOJnGN1ujAN6qjA/A= 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=ZFmMFyGH; 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="ZFmMFyGH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1774372611; bh=dduxJCgHweVxYiNvudg2ZsGjXC2SsrE2dgbU9AwUCbA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ZFmMFyGHh8xLPoK0dJkucVrkCeSoHuJSPlHpbGmwX0EQlK9L1DCVMrrJDusFkzKh0 xCJtXs6P0TuSMxUwncWucmUDu148p4V6JUNYV3bK/FRwOe4Lw4Aw8pjE8a1rWVvqJv 0NGxAkOKVmosMYCT9KpoKNbIAU5Hymj6lbpTtq64= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Tue, 24 Mar 2026 18:16:46 +0100 Subject: [PATCH v2 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: <20260324-kbuild-missing-syscalls-v2-2-651b8beb0bfd@weissschuh.net> References: <20260324-kbuild-missing-syscalls-v2-0-651b8beb0bfd@weissschuh.net> In-Reply-To: <20260324-kbuild-missing-syscalls-v2-0-651b8beb0bfd@weissschuh.net> To: Arnd Bergmann , Thomas Bogendoerfer , Nathan Chancellor , Nicolas Schier Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-kbuild@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=1774372608; l=1897; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=dduxJCgHweVxYiNvudg2ZsGjXC2SsrE2dgbU9AwUCbA=; b=kAHN5WQSNDvqL5cVowFQLOPm7uQNBmUnSkbP4ygCMbiQeekCS/sIu+2fTy5KCDGm4j8v1VgbI q4my+qCwnmBDIkcsHl9d84DQ0j62lZRgBjGK+weUqVcAcZHkkxroKFZ 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 Fri Apr 3 10:24:45 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 DE77639BFE7; Tue, 24 Mar 2026 17:16:52 +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=1774372614; cv=none; b=c6JPwK8+ZoW12o+mElmUkdOwfXj/bLqiRI8Bq73rHJtvmay3p5HjVUQY065ZoZ4dexl63GCDnrNk5rr3Wkh3GzkKLNWe/RcIQZsC5mD2jYqk7Tc36Z5dOafVZmhnWSAeoWewn0vb0G/iGV2FnTRIPL2ub2TlY3XJg3E9M8yB26Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774372614; c=relaxed/simple; bh=AWPGSjlFGYCvM0Uf27Rjhu8lYH3auQ3CC8o4On5/Fg8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fC3IKudLE0ZnDhnXqds2/SpamaeQsDrwe825ETgAE13VI3Fc6GUuCbTGtatDAP8DV1kytK6PcSic8o323K9YWYsrz/RHoR/rZVRGUddbMOb7fZ3d8kejKf5m0nrJL+Vujyy6dVLzpGnhaLsvWeM2c2U7hqAVCy0wNd5J3yaCBaw= 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=Leqe5vwL; 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="Leqe5vwL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1774372611; bh=AWPGSjlFGYCvM0Uf27Rjhu8lYH3auQ3CC8o4On5/Fg8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Leqe5vwLM/IYMnZB2ew5KnxqE8SBhXPoILF4d+MItPHq3HjqI0aZaSEHJppRnT+qp a/BsRJ9g2v+joXC1tZtnCPsVB/Ls7u7w36OGw+NxTIhlL4kKlWAY0juuFTxaT3/eqA XTpkja5+cZNLXMwR/2Akb4gZ/i7pHY3CnhWQL6uU= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Tue, 24 Mar 2026 18:16:47 +0100 Subject: [PATCH v2 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: <20260324-kbuild-missing-syscalls-v2-3-651b8beb0bfd@weissschuh.net> References: <20260324-kbuild-missing-syscalls-v2-0-651b8beb0bfd@weissschuh.net> In-Reply-To: <20260324-kbuild-missing-syscalls-v2-0-651b8beb0bfd@weissschuh.net> To: Arnd Bergmann , Thomas Bogendoerfer , Nathan Chancellor , Nicolas Schier Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-kbuild@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=1774372608; l=1976; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=AWPGSjlFGYCvM0Uf27Rjhu8lYH3auQ3CC8o4On5/Fg8=; b=php6j205LocMv2mfZM19vfQjgmPBUt2US+ZalikYBSClGGFY96vwoeiHsp/AaKPNHZ8jVliBA 0XxziGWo3ItAkGwxzwsiMqosAOMXqLAtxIg8w7p4l2p5bJ40ENtwtj6 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