Signed-off-by: Denis Plotnikov <dplotnikov@xxxxxxxxxxxxx> --- include/linux/timekeeping.h | 3 +++ kernel/time/timekeeping.c | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h index edffe82..092bf5f 100644 --- a/include/linux/timekeeping.h +++ b/include/linux/timekeeping.h @@ -372,3 +372,6 @@ extern int update_persistent_clock64(struct timespec64 now); #endif + +extern const seqcount_t *get_tk_seq(void); +extern int get_tk_mono_clock_mode(void); diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 1cef214..3f35e52 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -2381,3 +2381,18 @@ void xtime_update(unsigned long ticks) write_sequnlock(&jiffies_lock); update_wall_time(); } + +/* + * Helpers forthe core timekeeper reading + */ +const seqcount_t *get_tk_seq(void) +{ + return &tk_core.seq; +} +EXPORT_SYMBOL(get_tk_seq); + +int get_tk_mono_clock_mode(void) +{ + return tk_core.timekeeper.tkr_mono.clock->archdata.vclock_mode; +} +EXPORT_SYMBOL(get_tk_mono_clock_mode); -- 2.7.4