add some timekeeping32 tweaks gone in 4.20.y
This commit is contained in:
parent
f8da17a3e9
commit
e1382154b1
@ -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);
|
||||
@ -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);
|
||||
24
patch/kernel/sunxi-dev/timekeeping32-tweaks-for-4.20.y.patch
Normal file
24
patch/kernel/sunxi-dev/timekeeping32-tweaks-for-4.20.y.patch
Normal 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);
|
||||
Loading…
Reference in New Issue
Block a user