[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <175086815615.406.2923173556935595786.tip-bot2@tip-bot2>
Date: Wed, 25 Jun 2025 16:15:56 -0000
From: "tip-bot2 for Thomas Gleixner" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: timers/ptp] ntp: Use ktime_get_ntp_seconds()
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@...utronix.de>
AuthorDate: Mon, 19 May 2025 10:33:31 +02:00
Committer: Thomas Gleixner <tglx@...utronix.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@...utronix.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;
Powered by blists - more mailing lists