summaryrefslogtreecommitdiff
path: root/include/linux/timekeeping.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-07-16 21:04:57 +0000
committerJohn Stultz <john.stultz@linaro.org>2014-07-23 15:01:47 -0700
commit48f18fd6addc199f330d838d54fe7b0a0892adaa (patch)
tree21f3f32df6a8ee014b6df7cd1b2653977df6f046 /include/linux/timekeeping.h
parent250fade8af2ac5dda8d5106ea06738b6f9e768a7 (diff)
timekeeping: Use ktime_get_boottime() for get_monotonic_boottime()
get_monotonic_boottime() is not used in fast pathes, so the extra timespec conversion is not problematic. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'include/linux/timekeeping.h')
-rw-r--r--include/linux/timekeeping.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h
index 8ea3ca1b0ee5..7b8f20007871 100644
--- a/include/linux/timekeeping.h
+++ b/include/linux/timekeeping.h
@@ -27,7 +27,6 @@ struct timespec __current_kernel_time(void);
*/
struct timespec get_monotonic_coarse(void);
extern void getrawmonotonic(struct timespec *ts);
-extern void get_monotonic_boottime(struct timespec *ts);
extern void ktime_get_ts64(struct timespec64 *ts);
extern int __getnstimeofday64(struct timespec64 *tv);
@@ -160,6 +159,14 @@ static inline u64 ktime_get_boot_ns(void)
}
/*
+ * Timespec interfaces utilizing the ktime based ones
+ */
+static inline void get_monotonic_boottime(struct timespec *ts)
+{
+ *ts = ktime_to_timespec(ktime_get_boottime());
+}
+
+/*
* RTC specific
*/
extern void timekeeping_inject_sleeptime(struct timespec *delta);