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=1796057417; b=X0q87nEXWII4fYev+nWyFCFfpvgmzY5h8fJM+f4y+rb5P1h1AHJoOMMk4AEuQRQK9gT5 vP5IxOja5zXK0/sje24snYmah+/tjqvzsCiAC4WfkCvcuKRbkErHuoAo3jXYGOpfOzAqQ HGtdg6TBWs+uwqmrRHocp2DoKrC7D5iWk/PxAQ7pBgGLZJ9yUqopSZciaHsXWe04cFKoM B3BDriejcsqvmT/A0Lw7AW4KzxH9rReqUgJq3ehtE3Df/3dcgwk3f9bRJU1ec74Dbx8v4 +ToVakBdVve1Mzf37ktzpvJeZnh1skkc3IWyoAiVdMbrO+KIqy5y0dugxjjP6NZkHeA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796057417; h=DMARC-Filter:From:DKIM-Signature:DKIM-Signature:Date:Subject: MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id: References:In-Reply-To:To:Cc:X-Developer-Signature:X-Developer-Key; bh=k0lw2DIOfRmwam36PiOJcVtmueU3o/q1hEYON9PpUeE=; b=IQCuBjxJH/kTgN0U9Z/8b9hQTzIVqFf2McnQ4uba3Wv64Y2x5NAzAX3vp1L1C3pSwjVv cFo3exJeQkE7Y4p5tMtf93O9CyToPkPPnlE/Ap3rmL/DU5fhrI494ESgDwgJC0izJQpC+ Elv8qVHevzTNj6juZOvN3iGi8anl4oUnbWrb2hoYjUG5v/8JlCR00PQkwo1JHe3+vC+vI obrgwcEnHNF7Yx2QGPKhL6WpBVnNaAusgynef88McniWcxRkl23xRqdqEHQj7Ze/ta9CP 6StmBJOQBTvaN+3SjG/SO6UBm913rF83xioz5mOjMZZeLEiuNd8fhRmdV6SLwSQHwKQ== 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=WLIF+zxP; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=wJoRdMrz; 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 04CE0606A329 for ; Mon, 30 Nov 2026 16:50:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 04CE0606A329 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=WLIF+zxP; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=wJoRdMrz 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=1796057415; 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: in-reply-to:in-reply-to:references:references; bh=k0lw2DIOfRmwam36PiOJcVtmueU3o/q1hEYON9PpUeE=; b=WLIF+zxPjhB4p41AnEBc4s6KZfWpVuZUOjclXWS2MeSjMbnWwsiE0Y1NZ+vpRXDUgZXHJB 0NkWmKyJlJva4lHgH9OJgxKWDkT15pnnSFqKYfkqoH8ehJNV2/MzCEh3Bpu6ymVTU5pUuC LCG/1X+VdvHsPucJKZ39geake50RJoxUZOtCoWHTj2pTCmm4dmdwkbVBUnBel6rdxjOiNS U2zP3hfo209db18eWBfFCnoAMwc7EaWrr1TMexVo1FpkyrcRPqnWPkhtjAwoy4rrrgUvAT lJ80H+zpcflpKDAXPwNZTiH80SifB7APBIB0/LpDTG6UBHVuZHjwIItyav2Bwg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1796057415; 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: in-reply-to:in-reply-to:references:references; bh=k0lw2DIOfRmwam36PiOJcVtmueU3o/q1hEYON9PpUeE=; b=wJoRdMrzXRE4qXWXQEf6+iKuA9U8VWG1ab6qvARNncDw8NAKoOoJGgOqdqTEyAYGC+Gae0 wcs/SlTf6mvNmKAw== Date: Mon, 30 Nov 2026 17:50:01 +0100 Subject: [PATCH v3 2/4] timekeeping: Use timekeeper_is_core_tk() in timekeeping_update_on_shadow() 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 Message-Id: <20261130-timekeeping-conditionals-v3-2-3f95edbfec4d@linutronix.de> References: <20261130-timekeeping-conditionals-v3-0-3f95edbfec4d@linutronix.de> In-Reply-To: <20261130-timekeeping-conditionals-v3-0-3f95edbfec4d@linutronix.de> 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=929; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=7ouPSB7L+EAdvGna9669ggaxMC2Br9w+TFB5qh9qLtY=; b=/yM84BcojeD5zOm0LfTNa2SbreStdevWoFzYqrX7d6TjSg5uB/N1eZgvIGppSOct4w3+RmIbA NzYcpx+XISAAo2tRWmpyGu76PGivSxgsjaSC1Y4eIHGQevPpLRu8MCB X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= If CONFIG_POSIX_AUX_CLOCKS is disabled, the timekeeper is known to be the core timekeeper. Use the helper to avoid the conditional at runtime in this case. Signed-off-by: Thomas Weißschuh (Schneider Electric) --- kernel/time/timekeeping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index ac67cb636d7b..9d304a998758 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -845,7 +845,7 @@ static void timekeeping_update_from_shadow(struct tk_data *tkd, unsigned int act tk_update_ktime_data(tk); tk->tkr_mono.base_real = tk->tkr_mono.base + tk->offs_real; - if (tk->id == TIMEKEEPER_CORE) { + if (timekeeper_is_core_tk(tk)) { tk_update_ns_to_cyc(tk, &tkd->timekeeper); update_vsyscall(tk); update_pvclock_gtod(tk, action & TK_CLOCK_WAS_SET); -- 2.56.1