From nobody Sun Apr 5 18:02:02 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 4BCF13346A8; Thu, 2 Apr 2026 14:36:27 +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=1775140588; cv=none; b=Q3k7a3/5iYEePLPpikCOywpg9Dl+Y1DEMpDfFJMRdClrqml4Wq9bxhLSgQNgqoIfjukQCVYigFuely4WDfaRxw0WgLtiKzJnHoFtciStj34oMNdG8CQUrUif2AyGz//slgSsWHLLU6YY5EtASNJboTBc/FKk3kpbgGgdjmMYD4A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775140588; c=relaxed/simple; bh=skHgsjllCjONubULCO5MAmo+ht3WwPSrHT2emExS1rQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KNgKGVcF/kXpVyQF9NLqm+Gd8QtG9gPTHeCtYljx6UrK/PwXlwUZWUZiqPc9yCdWZkI9cfqqD+lD4lXeQg9v9dNygBTUysE/qht/WCdJuQvWyX5XMfWOsSLtp8R3jvcQkeXJKePpNM/NZ3z29aMMt1Ii0c0TSEnerqWIkAFD+AA= 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=UW08Li5s; 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="UW08Li5s" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1775140579; bh=skHgsjllCjONubULCO5MAmo+ht3WwPSrHT2emExS1rQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=UW08Li5sDRcR1Bylg7XRixRAfT+usztJY7yTdrPeTpYtmd446gQP4TDrga78S2TEt 3/WE8J4TNERSHvM4WPKmCZmoPH8op9AsR6/SWyJzEqBBDI5nnk9jI1oPk29t5Xr3Tg ea3iut3Ppiiuin9f9sOMOn+LSdPotcbPry1tus2w= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 02 Apr 2026 16:36:19 +0200 Subject: [PATCH v3 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: <20260402-kbuild-missing-syscalls-v3-2-6641be1de2db@weissschuh.net> References: <20260402-kbuild-missing-syscalls-v3-0-6641be1de2db@weissschuh.net> In-Reply-To: <20260402-kbuild-missing-syscalls-v3-0-6641be1de2db@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.15.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1775140579; l=1984; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=skHgsjllCjONubULCO5MAmo+ht3WwPSrHT2emExS1rQ=; b=2kWk2dU0Kl/hKnt6nTDB/MICPgFwAuOaOMTEos7JVz4sdU4znfeQ8OrNpkhkAckpZrbhHYXyD jt9wO4v6B1YCrWNUxMCyvaTY8rl3Uqr3W6bm9MLBcCkICab4x9j9M9W 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 Acked-by: Arnd Bergmann Reviewed-by: Nicolas Schier --- 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