From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 86B1B3D75A1; Tue, 7 Jul 2026 22:22:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783462927; cv=none; b=qOKnIsWbSxaHe/hUKT7cnFJ4WyrZ/iIlJuUlPWwO3LSkbOR6ywz1h3RuXnutcAMzZWQC8bhywhCpad7WWo6W/QjOnKtaBzny0iP7sMcYAAWO5qdPJQYVFuYEI92bpioxHD6n30AvE6yJScv0Y2xngNDCYcBohS1tEzrRanAloOw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783462927; c=relaxed/simple; bh=ACupf1RecyQ/Jl0YRhTzaLd5VUS5WcSUF1FSQEaHe0g=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=nId/KgkVRHo0VC8i0kkZ8rmYD/sbg5fYHVYH+TBgo1mUUMPWYYWt0Jc+1LXSMATtp8ELzIInj+E5JajA0APqKF2JVxBK4ydWYnqEN0Zl6Qze0BsFnPzaUmGt95aJOht5vnGZgb1Q0j2Yzxc86flCCJ2Mz+yLOFJ+evhV1hTPEgk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=fLpIPfjd; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=rwIxpQlI; arc=none smtp.client-ip=193.142.43.55 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.b="fLpIPfjd"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="rwIxpQlI" Date: Tue, 07 Jul 2026 22:22:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1783462924; h=from:from:sender:sender:reply-to: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=McjmnMohUgndV/v1rTnUefjmK4P/9Xp9XjUQRNWmT9E=; b=fLpIPfjd81quwTM/Q0zeyxT4yCa3y4CovzJNw+HMdRjPAEnL86cew3Xcm1gENB5zkQWY36 ET9nkOwy30E1TBJKIEJC55+NDG5dN5I/FEiwgd+2d8ZXr8/BYAvm8tlBfh1NbYCpbHBdMN mDyb0XiHvrgNeHL8DxAuQFFWn2UdGdhy4ivVgzQf/AUQ9pZD92kLyd/hUk/t34XmCR66LM YtEXaThr1tupwZslkysLlmZjZQ3hCy4/JAOMAQ3/eXHGWZhYKNL4Hp2DLRQ65aggH7wymU g5AR1D/P+0JNfDtyNV06yYc+6d6yyek/KBkBRZ3bFPhymfitx2i4K4KBljd7VA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1783462924; h=from:from:sender:sender:reply-to: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=McjmnMohUgndV/v1rTnUefjmK4P/9Xp9XjUQRNWmT9E=; b=rwIxpQlIC08VxtTUoMo6MzXUwue+XX/4D4aqu/zMwvhrgA+/JGd3gv/Hc9twNRZ+ZNIpuF FEgsmwZaDkxvo0Bw== From: "tip-bot2 for David Woodhouse" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] ntp: Remove tick_length_base, use tick_length directly Cc: David Woodhouse , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260621220051.1030462-8-dwmw2@infradead.org> References: <20260621220051.1030462-8-dwmw2@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178346292275.744054.9993528704475009251.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the timers/core branch of tip: Commit-ID: f5abf0e07894551c50767bd9bc3a73e3fa7e4664 Gitweb: https://git.kernel.org/tip/f5abf0e07894551c50767bd9bc3a73e3fa7= e4664 Author: David Woodhouse AuthorDate: Sun, 21 Jun 2026 22:54:00 +01:00 Committer: Thomas Gleixner CommitterDate: Wed, 08 Jul 2026 00:17:27 +02:00 ntp: Remove tick_length_base, use tick_length directly Now that nothing inflates tick_length beyond tick_length_base (the adjtime path was converted to use time_offset in the previous commit), the two fields are always equal. Remove tick_length_base and keep tick_length as the single field. Remove the per-second reset and the delta update in ntp_update_frequency() since there is no separate base to track. No functional change intended. Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Assisted-by: Kiro:claude-opus-4.6-1m Link: https://patch.msgid.link/20260621220051.1030462-8-dwmw2@infradead.org --- kernel/time/ntp.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index 73a47dd..d22b532 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c @@ -26,8 +26,7 @@ /** * struct ntp_data - Structure holding all NTP related state * @tick_usec: USER_HZ period in microseconds - * @tick_length: Adjusted tick length - * @tick_length_base: Base value for @tick_length + * @tick_length: Tick length in ns << NTP_SCALE_SHIFT * @time_state: State of the clock synchronization * @time_status: Clock status bits * @time_offset: Time adjustment in nanoseconds @@ -68,7 +67,6 @@ struct ntp_data { unsigned long tick_usec; u64 tick_length; - u64 tick_length_base; int time_state; int time_status; s64 time_offset; @@ -260,8 +258,7 @@ static inline void pps_fill_timex(struct ntp_data *ntpdat= a, struct __kernel_time #endif /* CONFIG_NTP_PPS */ =20 /* - * Update tick_length and tick_length_base, based on tick_usec, ntp_tick_adj= and - * time_freq: + * Update tick_length based on tick_usec, ntp_tick_adj and time_freq: */ static void ntp_update_frequency(struct ntp_data *ntpdata) { @@ -279,8 +276,7 @@ static void ntp_update_frequency(struct ntp_data *ntpdata) * Don't wait for the next second_overflow, apply the change to the * tick length immediately: */ - ntpdata->tick_length +=3D new_base - ntpdata->tick_length_base; - ntpdata->tick_length_base =3D new_base; + ntpdata->tick_length =3D new_base; } =20 static inline s64 ntp_update_offset_fll(struct ntp_data *ntpdata, s64 offset= 64, long secs) @@ -358,7 +354,6 @@ static void __ntp_clear(struct ntp_data *ntpdata) =20 ntp_update_frequency(ntpdata); =20 - ntpdata->tick_length =3D ntpdata->tick_length_base; ntpdata->time_offset =3D 0; ntpdata->skew_delta =3D 0; =20 @@ -670,7 +665,6 @@ int second_overflow(unsigned int tkid, time64_t secs) } =20 /* Compute the phase adjustment for the next second */ - ntpdata->tick_length =3D ntpdata->tick_length_base; =20 /* Check PPS signal */ pps_dec_valid(ntpdata);