build/patch/kernel/meson64-dev/timekeeping32-tweaks-for-4.20.y.patch
2019-01-21 01:18:20 -05:00

24 lines
663 B
Diff

diff --git a/include/linux/timekeeping32.h b/include/linux/timekeeping32.h
index a502616..43a3837 100644
--- a/include/linux/timekeeping32.h
+++ b/include/linux/timekeeping32.h
@@ -53,6 +53,19 @@ static inline void getboottime(struct timespec *ts)
}
/*
+ * Timespec interfaces utilizing the ktime based ones
+ */
+static inline void get_monotonic_boottime(struct timespec *ts)
+{
+ *ts = ktime_to_timespec(ktime_get_boottime());
+}
+
+static inline void timekeeping_clocktai(struct timespec *ts)
+{
+ *ts = ktime_to_timespec(ktime_get_clocktai());
+}
+
+/*
* Persistent clock related interfaces
*/
extern void read_persistent_clock(struct timespec *ts);