mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Thomas Gleixner" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: timers/ptp] ntp: Use ktime_get_ntp_seconds()
Date: Wed, 25 Jun 2025 16:15:56 -0000	[thread overview]
Message-ID: <175086815615.406.2923173556935595786.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20250519083026.472512636@linutronix.de>

The following commit has been merged into the timers/ptp branch of tip:

Commit-ID:     c85f5ab60820bde1510110e403d17456fbb8c266
Gitweb:        https://git.kernel.org/tip/c85f5ab60820bde1510110e403d17456fbb8c266
Author:        Thomas Gleixner <tglx@linutronix.de>
AuthorDate:    Mon, 19 May 2025 10:33:31 +02:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Thu, 19 Jun 2025 14:28:24 +02:00

ntp: Use ktime_get_ntp_seconds()

Use ktime_get_ntp_seconds() to prepare for auxiliary clocks so that
the readout becomes per timekeeper.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250519083026.472512636@linutronix.de


---
 kernel/time/ntp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index 9aba1bc..97fa99b 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -303,7 +303,7 @@ static void ntp_update_offset(struct ntp_data *ntpdata, long offset)
 	 * Select how the frequency is to be controlled
 	 * and in which mode (PLL or FLL).
 	 */
-	real_secs = __ktime_get_real_seconds();
+	real_secs = ktime_get_ntp_seconds(ntpdata - tk_ntp_data);
 	secs = (long)(real_secs - ntpdata->time_reftime);
 	if (unlikely(ntpdata->time_status & STA_FREQHOLD))
 		secs = 0;
@@ -710,7 +710,7 @@ static inline void process_adj_status(struct ntp_data *ntpdata, const struct __k
 	 * reference time to current time.
 	 */
 	if (!(ntpdata->time_status & STA_PLL) && (txc->status & STA_PLL))
-		ntpdata->time_reftime = __ktime_get_real_seconds();
+		ntpdata->time_reftime = ktime_get_ntp_seconds(ntpdata - tk_ntp_data);
 
 	/* only set allowed bits */
 	ntpdata->time_status &= STA_RONLY;

  reply	other threads:[~2025-06-25 16:15 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-19  8:33 [patch V2 00/26] timekeeping: Provide support for auxiliary timekeepers Thomas Gleixner
2025-05-19  8:33 ` [patch V2 01/26] timekeeping: Remove hardcoded access to tk_core Thomas Gleixner
2025-06-12 22:34   ` John Stultz
2025-06-25 16:16   ` [tip: timers/ptp] " tip-bot2 for Thomas Gleixner
2025-05-19  8:33 ` [patch V2 02/26] timekeeping: Cleanup kernel doc of __ktime_get_real_seconds() Thomas Gleixner
2025-06-12 22:36   ` John Stultz
2025-06-25 16:16   ` [tip: timers/ptp] " tip-bot2 for Thomas Gleixner
2025-05-19  8:33 ` [patch V2 03/26] timekeeping: Avoid double notification in do_adjtimex() Thomas Gleixner
2025-06-25 16:16   ` [tip: timers/ptp] " tip-bot2 for Thomas Gleixner
2025-05-19  8:33 ` [patch V2 04/26] timekeeping: Introduce timekeeper ID Thomas Gleixner
2025-06-13  0:03   ` John Stultz
2025-06-25 16:16   ` [tip: timers/ptp] " tip-bot2 for Anna-Maria Behnsen
2025-05-19  8:33 ` [patch V2 05/26] time: Introduce auxiliary POSIX clocks Thomas Gleixner
2025-06-13  0:06   ` John Stultz
2025-06-25 16:16   ` [tip: timers/ptp] " tip-bot2 for Anna-Maria Behnsen
2025-05-19  8:33 ` [patch V2 06/26] ntp: Add support for auxiliary timekeepers Thomas Gleixner
2025-06-13  0:14   ` John Stultz
2025-06-13  6:32   ` Thomas Weißschuh
2025-06-25 16:16   ` [tip: timers/ptp] " tip-bot2 for Thomas Gleixner
2025-05-19  8:33 ` [patch V2 07/26] ntp: Add timekeeper ID arguments to public functions Thomas Gleixner
2025-06-13  0:20   ` John Stultz
2025-06-25 16:16   ` [tip: timers/ptp] " tip-bot2 for Thomas Gleixner
2025-05-19  8:33 ` [patch V2 08/26] ntp: Rename __do_adjtimex() to ntp_adjtimex() Thomas Gleixner
2025-06-13  0:20   ` John Stultz
2025-06-25 16:16   ` [tip: timers/ptp] " tip-bot2 for Thomas Gleixner
2025-05-19  8:33 ` [patch V2 09/26] timekeeping: Make __timekeeping_advance() reusable Thomas Gleixner
2025-06-13  0:23   ` John Stultz
2025-06-25 16:16   ` [tip: timers/ptp] " tip-bot2 for Anna-Maria Behnsen
2025-05-19  8:33 ` [patch V2 10/26] timekeeping: Prepare timekeeping_update_from_shadow() Thomas Gleixner
2025-06-25 16:16   ` [tip: timers/ptp] " tip-bot2 for Thomas Gleixner
2025-05-19  8:33 ` [patch V2 11/26] timekeeping: Add clock_valid flag to timekeeper Thomas Gleixner
2025-06-13  4:05   ` John Stultz
2025-06-25 16:15   ` [tip: timers/ptp] " tip-bot2 for Thomas Gleixner
2025-05-19  8:33 ` [patch V2 12/26] timekeeping: Introduce auxiliary timekeepers Thomas Gleixner
2025-06-14  2:41   ` John Stultz
2025-06-25 16:15   ` [tip: timers/ptp] " tip-bot2 for Anna-Maria Behnsen
2025-05-19  8:33 ` [patch V2 13/26] timekeeping: Provide ktime_get_ntp_seconds() Thomas Gleixner
2025-06-25 16:15   ` [tip: timers/ptp] " tip-bot2 for Thomas Gleixner
2025-05-19  8:33 ` [patch V2 14/26] ntp: Use ktime_get_ntp_seconds() Thomas Gleixner
2025-06-25 16:15   ` tip-bot2 for Thomas Gleixner [this message]
2025-05-19  8:33 ` [patch V2 15/26] timekeeping: Add AUX offset to struct timekeeper Thomas Gleixner
2025-06-14  2:44   ` John Stultz
2025-06-25 16:15   ` [tip: timers/ptp] " tip-bot2 for Thomas Gleixner
2025-05-19  8:33 ` [patch V2 16/26] timekeeping: Update auxiliary timekeepers on clocksource change Thomas Gleixner
2025-05-19  8:33 ` [patch V2 17/26] timekeeping: Provide time getters for auxiliary clocks Thomas Gleixner
2025-06-14  2:51   ` John Stultz
2025-06-14  7:18     ` Thomas Gleixner
2025-05-19  8:33 ` [patch V2 18/26] timekeeping: Add minimal posix-timers support " Thomas Gleixner
2025-05-19  8:33 ` [patch V2 19/26] timekeeping: Provide time setter " Thomas Gleixner
2025-05-19  8:33 ` [patch V2 20/26] timekeeping: Make timekeeping_inject_offset() reusable Thomas Gleixner
2025-05-19  8:33 ` [patch V2 21/26] timekeeping: Add auxiliary clock support to __timekeeping_inject_offset() Thomas Gleixner
2025-05-19  8:33 ` [patch V2 22/26] timekeeping: Make do_adjtimex() reusable Thomas Gleixner
2025-05-19  8:33 ` [patch V2 23/26] timekeeping: Prepare do_adtimex() for auxiliary clocks Thomas Gleixner
2025-05-19  8:33 ` [patch V2 24/26] timekeeping: Provide adjtimex() " Thomas Gleixner
2025-05-19  8:33 ` [patch V2 25/26] timekeeping: Provide update for auxiliary timekeepers Thomas Gleixner
2025-05-19  8:33 ` [patch V2 26/26] timekeeping: Provide interface to control auxiliary clocks Thomas Gleixner
2025-06-13  7:18   ` Thomas Weißschuh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=175086815615.406.2923173556935595786.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®