More 2038 timer work for 3.19
Linus,
please pull the latest timers-2038-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-2038-for-linus
Two more patches for the ongoing 2038 work:
- New accessors to clock MONOTONIC and REALTIME seconds
This is a seperate branch as Arnd has follow up work depending on this.
Thanks,
tglx
------------------>
Heena Sirwani (2):
timekeeping: Provide fast accessor to the seconds part of CLOCK_MONOTONIC
timekeeping: Provide y2038 safe accessor to the seconds portion of CLOCK_REALTIME
include/linux/timekeeper_internal.h | 2 ++ include/linux/timekeeping.h | 2 ++ kernel/time/timekeeping.c | 68 ++++++++++++++++++++++++++++++++++--- 3 files changed, 67 insertions(+), 5 deletions(-)
include/linux/timekeeper_internal.h +2 -0
@@ -42,6 +42,7 @@ struct tk_read_base {* struct timekeeper - Structure holding internal timekeeping values. * @tkr: The readout base structure * @xtime_sec: Current CLOCK_REALTIME time in seconds +* @ktime_sec: Current CLOCK_MONOTONIC time in seconds * @wall_to_monotonic: CLOCK_REALTIME to CLOCK_MONOTONIC offset * @offs_real: Offset clock monotonic -> clock realtime * @offs_boot: Offset clock monotonic -> clock boottime
@@ -77,6 +78,7 @@ struct tk_read_base {struct timekeeper {struct tk_read_base tkr;u64 xtime_sec; +unsigned long ktime_sec;struct timespec64 wall_to_monotonic;ktime_t offs_real;ktime_t offs_boot;
include/linux/timekeeping.h +2 -0
@@ -28,6 +28,8 @@ struct timespec __current_kernel_time(void);struct timespec get_monotonic_coarse (void );extern void getrawmonotonic (struct timespec *ts);extern void ktime_get_ts64 (struct timespec64 *ts); +extern time64_t ktime_get_seconds (void ); +extern time64_t ktime_get_real_seconds (void );extern int __getnstimeofday64 (struct timespec64 *tv);extern void getnstimeofday64 (struct timespec64 *tv);
kernel/time/timekeeping.c +63 -5
89 lines not on this page · raw message