From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=193.142.43.55 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796057413; b=v4hNI1iFALNtmQFEaJ+Oc+Zg1/zTjbFz1le9BOhaqY5tW25Ijupopj5cENGkkHXxAMPx JPhOf/WAWyp3ZjEaIyb6onSVth5lOaXcioLhsKNsa/0WomBHZFwt8RSIbTscah/1t/DEz L09juffaenSQgQSTS9Kl1y4vSI6zJXxvHL7w83CM26DIc46GSU+B3qsvg91iNCnT1thgS fl5xatRx+poRjsvU1bP8JRmHbWiLZ+loeVG+MqTPRRH+sRag2xNM4TQ7XA+KoWITIvdUz z9PmV7NCGqlCQZFa2BNyWQ0Ye5VzKu7ptNl4LbKmsvRauj0MCTzyxSfr6A8er/+l8eA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796057413; h=DMARC-Filter:From:DKIM-Signature:DKIM-Signature:Subject:Date: Message-Id:MIME-Version:Content-Type:Content-Transfer-Encoding: X-B4-Tracking:X-Change-ID:To:Cc:X-Developer-Signature: X-Developer-Key; bh=9aco0Tgf3V6Vtqa1wsji1e92Yq6ZraSoqiAnQIyL1LQ=; b=GYMUVCOgNA/ufIuRWaDYtAhrLLDMbM4i5piYBrZzUJpW2f8NP/mUBGoZ9YDPRIpH1q0f bHR49LLHkw5Onu0wcoHyOFd6+96B24W2aE7tB4A2hA5RNklU0tcHwiwAp6uEz2otp72qA 46U0VsYjSv3qLM//W53vm8XRmYspu+F3cS5cz4Azi/lL9BzuB0uRPsHKr99QKZAicETQ2 sJX0cHj61rilaAlnwjlGlWiCp8A1+ovTbK5w0lSJKdZ/Baei6+g4RFsnAaW/588TlSX6B BZPL2xJZ0YDEIT4ovCCmsBaoqOGvmoby2VRHjw4Z5/9Qgcl5dIOf15qaQf41TeJu1LQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=32+iAymP; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b="/sY1HkmW"; arc=none smtp.remote-ip=193.142.43.55 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60595606A31C for ; Mon, 30 Nov 2026 16:50:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 60595606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=32+iAymP; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=/sY1HkmW From: =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1796057411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9aco0Tgf3V6Vtqa1wsji1e92Yq6ZraSoqiAnQIyL1LQ=; b=32+iAymPZQZqOiDsjCJ2GUfoJyRSKHTfENR1NsV2ed9vCfGAQRTn6ErWyfNPZrgo9Ca02X WjngHot/eyc2pDlxKp+YyhR+Hjd9efPXnsg92bSlpxplu92GX/AZ0VjAQPQobMM7y6cUPi knKFBLJ6KRXzMpdYjESa5B3b7/9o7oDbW3yWm/sczideuUTnZ3zuSyiQq2ME1nOz2AZM5E fBtUA1Xlufj1D2++ddbZlapQqfCq2KCNm9u39aYyTgb58yMhnTUTkrgOCXo15VM4+60k4/ zcW/wpFwGXl0x4jIdNFLdpuhseoyEefuPCq827QXIac4kDwWLoKWAo0G9eg6Ow== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1796057411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9aco0Tgf3V6Vtqa1wsji1e92Yq6ZraSoqiAnQIyL1LQ=; b=/sY1HkmWpFm4ZMyFHGH4G7UCZQKsnssNgEWooeEP36NFKwv+FKTfp3lNrR8gSsO9j+AUCj 7vMuurMDmHFnfJBA== Subject: [PATCH v3 0/4] timekeeping: Avoid some runtime conditionals around auxiliary clocks Date: Mon, 30 Nov 2026 17:49:59 +0100 Message-Id: <20261130-timekeeping-conditionals-v3-0-3f95edbfec4d@linutronix.de> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/33NQQ6CMBCF4auQrq1pi7ToynsYF8iMMBFb0laCI dzdggsTE13+k7xvJhbQEwZ2yCbmcaBAzqbINxmr28o2yAlSMyWUFkZIHumON8SebMNrZ4FiWlR d4KpABbsCSg17lua9xyuNK306p24pROef66dBLtc3Wkr1Gx0kF9wUeMFca20MHDuyj+idpXELy BZ4UB9sL8o/mEpYsuocDUqoxDc2z/MLF08A2BEBAAA= X-Change-ID: 20260701-timekeeping-conditionals-25e2d45d86d9 To: John Stultz , Thomas Gleixner , Stephen Boyd , Miroslav Lichvar Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh_=28Schneider_Electric=29?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1796057406; l=1339; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=3X3UtO/DK0WCN+gqEI7J4jF4i/4ufQcC3pcifDT8jEM=; b=GoOumqlQEbOIIMi29yb5U11fEabebz2qxxt+8TiWOshYEyMOM1JflC7IYalun3ZCmtvnHbj6/ chzA6HjrXMDBi3Qi5tFH8jvDh+guXnXSx03RyhIsCMeZAJtaIY/vTgQ X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Some of the conditionals around auxiliary timekeepers are known at compile time but are currently checked at runtime. Introduce and use some helpers to avoid the runtime overhead. Signed-off-by: Thomas Weißschuh (Schneider Electric) --- Changes in v3: - Rebase on current tip/timers/core. - Improve the title of patch 3 a bit. - Keep some more whitespace around the function definitions in patch 3. - Link to v2: https://patch.msgid.link/20260908-timekeeping-conditionals-v2-0-5ebc3e7e1da0@linutronix.de Changes in v2: - Rebase on v7.3-rc1. - Link to v1: https://patch.msgid.link/20260812-timekeeping-conditionals-v1-0-75ebe366677d@linutronix.de --- Thomas Weißschuh (Schneider Electric) (4): timekeeping: Move timekeeper_is_core_tk() up in the file timekeeping: Use timekeeper_is_core_tk() in timekeeping_update_on_shadow() timekeeping: Remove the unnecessary tk_is_aux() timekeeping: Introduce and use timekeeper_is_clock_valid() kernel/time/timekeeping.c | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) --- base-commit: f21571ed8908094d4d1c15271487475e02864496 change-id: 20260701-timekeeping-conditionals-25e2d45d86d9 Best regards, -- Thomas Weißschuh