diff options
Diffstat (limited to 'include/linux/timekeeping.h')
-rw-r--r-- | include/linux/timekeeping.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h index 3eaae4754275..99176af216af 100644 --- a/include/linux/timekeeping.h +++ b/include/linux/timekeeping.h | |||
@@ -214,12 +214,18 @@ static inline u64 ktime_get_boot_ns(void) | |||
214 | return ktime_to_ns(ktime_get_boottime()); | 214 | return ktime_to_ns(ktime_get_boottime()); |
215 | } | 215 | } |
216 | 216 | ||
217 | static inline u64 ktime_get_tai_ns(void) | ||
218 | { | ||
219 | return ktime_to_ns(ktime_get_clocktai()); | ||
220 | } | ||
221 | |||
217 | static inline u64 ktime_get_raw_ns(void) | 222 | static inline u64 ktime_get_raw_ns(void) |
218 | { | 223 | { |
219 | return ktime_to_ns(ktime_get_raw()); | 224 | return ktime_to_ns(ktime_get_raw()); |
220 | } | 225 | } |
221 | 226 | ||
222 | extern u64 ktime_get_mono_fast_ns(void); | 227 | extern u64 ktime_get_mono_fast_ns(void); |
228 | extern u64 ktime_get_raw_fast_ns(void); | ||
223 | 229 | ||
224 | /* | 230 | /* |
225 | * Timespec interfaces utilizing the ktime based ones | 231 | * Timespec interfaces utilizing the ktime based ones |
@@ -242,6 +248,9 @@ static inline void timekeeping_clocktai(struct timespec *ts) | |||
242 | /* | 248 | /* |
243 | * RTC specific | 249 | * RTC specific |
244 | */ | 250 | */ |
251 | extern bool timekeeping_rtc_skipsuspend(void); | ||
252 | extern bool timekeeping_rtc_skipresume(void); | ||
253 | |||
245 | extern void timekeeping_inject_sleeptime64(struct timespec64 *delta); | 254 | extern void timekeeping_inject_sleeptime64(struct timespec64 *delta); |
246 | 255 | ||
247 | /* | 256 | /* |
@@ -253,17 +262,14 @@ extern void getnstime_raw_and_real(struct timespec *ts_raw, | |||
253 | /* | 262 | /* |
254 | * Persistent clock related interfaces | 263 | * Persistent clock related interfaces |
255 | */ | 264 | */ |
256 | extern bool persistent_clock_exist; | ||
257 | extern int persistent_clock_is_local; | 265 | extern int persistent_clock_is_local; |
258 | 266 | ||
259 | static inline bool has_persistent_clock(void) | ||
260 | { | ||
261 | return persistent_clock_exist; | ||
262 | } | ||
263 | |||
264 | extern void read_persistent_clock(struct timespec *ts); | 267 | extern void read_persistent_clock(struct timespec *ts); |
268 | extern void read_persistent_clock64(struct timespec64 *ts); | ||
265 | extern void read_boot_clock(struct timespec *ts); | 269 | extern void read_boot_clock(struct timespec *ts); |
270 | extern void read_boot_clock64(struct timespec64 *ts); | ||
266 | extern int update_persistent_clock(struct timespec now); | 271 | extern int update_persistent_clock(struct timespec now); |
272 | extern int update_persistent_clock64(struct timespec64 now); | ||
267 | 273 | ||
268 | 274 | ||
269 | #endif | 275 | #endif |