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 E21CA3CCFDE; Fri, 10 Jul 2026 07:25:52 +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=1783668354; cv=none; b=cFYRi248duE5Qeq0VihR+2wMCFvVjF08TwzXkT1ZFsGJ7/xztTqRRHJv1F/sCGGb89Mlttq5bAmPA7ZYmwUhpFlXic58YqByUgSzxmSzpHK5r5mPwUFEb2oe+a/K3U7Q3rJkEQk+Ri3EupxYpGQjw1BItx0guLp99zL7wuYJOKc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783668354; c=relaxed/simple; bh=/g4Yt2HQV8JcuxkAd9YbUi+YGYEhJSskVidVjSQx8OI=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=mK/McGxDwkpav6xXiJhmNuy2EaHp4MgiPM8DfQRUQ4mGL4VPMzYTMQ1nm48NAjCLPTS6Pz9mLGt77IVEMrrqaHXEPIiSfjBltTxJpD8Lek6/zFJi3/Vu/14h/KF4L0acprW6gaGcyXDeDo/xhuMz74QAAAiPTBTg4Uuu+7MEOeM= 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=qIhv3FmZ; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=dvr9rA4R; 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="qIhv3FmZ"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="dvr9rA4R" Date: Fri, 10 Jul 2026 07:25:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1783668351; 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=Uw98ukoG3UfVLz1XEpq50kswYh5JYrWNXYDVrMo4weI=; b=qIhv3FmZhgCqzgsNi2HJoSviuUT3MvWENCsCAaH25MXYJdD3Djt/fpEnAkeSJjz0osfbk+ 8tJmYx4JozhJlXShdJnhqP1EQiDltO328Tud7QPBlQqF5CPMZ6lu1/RBIeLHKij91N/hsy wyUzvpvmOHl+nHLYogbXF1NVOSzC0fhUiCssWYt6LH+YVZ6Dx7/8k/8ndn0nl9UrPSG4RH j3kKd9dQ18oE3XThTKIDk1IPePq78OtZ9KHm65fs96pqaorEFH0fXT9bZyNJOHg71NOCQx MPe+udItI7d4410DIQ1Hnzsp32Aa+F/BMDN/5Lu/RMVYyuIa4RYW8Tk6XNVlmA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1783668351; 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=Uw98ukoG3UfVLz1XEpq50kswYh5JYrWNXYDVrMo4weI=; b=dvr9rA4RXV5JVTEyThLHqshN6aL+HrhM+eAXOjw886ZoBt+jRyv4sAwF2cJm+kqMtu5+A6 ppZNbh8ET/d7bdCA== 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: <178366835006.744054.12509291555176617605.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: 794ddd6e15cfd133c4a5c01dac37a5da04cbe186 Gitweb: https://git.kernel.org/tip/794ddd6e15cfd133c4a5c01dac37a5da04c= be186 Author: David Woodhouse AuthorDate: Sun, 21 Jun 2026 22:54:00 +01:00 Committer: Thomas Gleixner CommitterDate: Fri, 10 Jul 2026 09:20:55 +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);