1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 2aa6f9c59SJohn Stultz #ifndef _LINUX_NTP_INTERNAL_H 3aa6f9c59SJohn Stultz #define _LINUX_NTP_INTERNAL_H 4aa6f9c59SJohn Stultz 5aa6f9c59SJohn Stultz extern void ntp_init(void); 6aa6f9c59SJohn Stultz extern void ntp_clear(void); 7aa6f9c59SJohn Stultz /* Returns how long ticks are at present, in ns / 2^NTP_SCALE_SHIFT. */ 8aa6f9c59SJohn Stultz extern u64 ntp_tick_length(void); 9833f32d7SJohn Stultz extern ktime_t ntp_get_next_leap(void); 10c7963487SDengChao extern int second_overflow(time64_t secs); 117e8eda73SOndrej Mosnacek extern int __do_adjtimex(struct __kernel_timex *txc, 127e8eda73SOndrej Mosnacek const struct timespec64 *ts, 137e8eda73SOndrej Mosnacek s32 *time_tai, struct audit_ntp_data *ad); 14985e6950SOndrej Mosnacek extern void __hardpps(const struct timespec64 *phase_ts, const struct timespec64 *raw_ts); 15c9e6189fSThomas Gleixner 16c9e6189fSThomas Gleixner #if defined(CONFIG_GENERIC_CMOS_UPDATE) || defined(CONFIG_RTC_SYSTOHC) 17*35b603f8SBenjamin ROBIN extern void ntp_notify_cmos_timer(bool offset_set); 18c9e6189fSThomas Gleixner #else 19*35b603f8SBenjamin ROBIN static inline void ntp_notify_cmos_timer(bool offset_set) { } 20c9e6189fSThomas Gleixner #endif 21c9e6189fSThomas Gleixner 22aa6f9c59SJohn Stultz #endif /* _LINUX_NTP_INTERNAL_H */ 23