Skip to content

Commit c85f5ab

Browse files
committed
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
1 parent ffa0519 commit c85f5ab

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

kernel/time/ntp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ static void ntp_update_offset(struct ntp_data *ntpdata, long offset)
303303
* Select how the frequency is to be controlled
304304
* and in which mode (PLL or FLL).
305305
*/
306-
real_secs = __ktime_get_real_seconds();
306+
real_secs = ktime_get_ntp_seconds(ntpdata - tk_ntp_data);
307307
secs = (long)(real_secs - ntpdata->time_reftime);
308308
if (unlikely(ntpdata->time_status & STA_FREQHOLD))
309309
secs = 0;
@@ -710,7 +710,7 @@ static inline void process_adj_status(struct ntp_data *ntpdata, const struct __k
710710
* reference time to current time.
711711
*/
712712
if (!(ntpdata->time_status & STA_PLL) && (txc->status & STA_PLL))
713-
ntpdata->time_reftime = __ktime_get_real_seconds();
713+
ntpdata->time_reftime = ktime_get_ntp_seconds(ntpdata - tk_ntp_data);
714714

715715
/* only set allowed bits */
716716
ntpdata->time_status &= STA_RONLY;

0 commit comments

Comments
 (0)