add some timekeeping32 tweaks gone in 4.20.y

This commit is contained in:
Martin Ayotte 2019-01-09 10:36:08 -05:00
parent f8da17a3e9
commit e1382154b1
3 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,24 @@
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);

View File

@ -0,0 +1,24 @@
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);

View File

@ -0,0 +1,24 @@
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);