xref: /openbmc/linux/kernel/time/ntp_internal.h (revision c9e6189f)
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);
15*c9e6189fSThomas Gleixner 
16*c9e6189fSThomas Gleixner #if defined(CONFIG_GENERIC_CMOS_UPDATE) || defined(CONFIG_RTC_SYSTOHC)
17*c9e6189fSThomas Gleixner extern void ntp_notify_cmos_timer(void);
18*c9e6189fSThomas Gleixner #else
ntp_notify_cmos_timer(void)19*c9e6189fSThomas Gleixner static inline void ntp_notify_cmos_timer(void) { }
20*c9e6189fSThomas Gleixner #endif
21*c9e6189fSThomas Gleixner 
22aa6f9c59SJohn Stultz #endif /* _LINUX_NTP_INTERNAL_H */
23