aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/sched.h1
-rw-r--r--kernel/time/timekeeping.c13
2 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index d747f948b34e..9d9a0787eed3 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2050,6 +2050,7 @@ extern void release_uids(struct user_namespace *ns);
2050#include <asm/current.h> 2050#include <asm/current.h>
2051 2051
2052extern void do_timer(unsigned long ticks); 2052extern void do_timer(unsigned long ticks);
2053extern void xtime_update(unsigned long ticks);
2053 2054
2054extern int wake_up_state(struct task_struct *tsk, unsigned int state); 2055extern int wake_up_state(struct task_struct *tsk, unsigned int state);
2055extern int wake_up_process(struct task_struct *tsk); 2056extern int wake_up_process(struct task_struct *tsk);
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 8da35d1b9e16..02c13a313d15 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -969,3 +969,16 @@ void get_xtime_and_monotonic_offset(struct timespec *xtim, struct timespec *wtom
969 *wtom = wall_to_monotonic; 969 *wtom = wall_to_monotonic;
970 } while (read_seqretry(&xtime_lock, seq)); 970 } while (read_seqretry(&xtime_lock, seq));
971} 971}
972
973/**
974 * xtime_update() - advances the timekeeping infrastructure
975 * @ticks: number of ticks, that have elapsed since the last call.
976 *
977 * Must be called with interrupts disabled.
978 */
979void xtime_update(unsigned long ticks)
980{
981 write_seqlock(&xtime_lock);
982 do_timer(ticks);
983 write_sequnlock(&xtime_lock);
984}