aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time/timekeeping.c
diff options
context:
space:
mode:
authorTorben Hohn <torbenh@gmx.de>2011-01-27 09:59:10 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-01-31 08:55:43 -0500
commitf0af911a9dec9de702645182c8d269449e24d24b (patch)
tree17cd5683ab3878479b59d9786102fcf699d3051a /kernel/time/timekeeping.c
parent79ecaf0d15344d78904becf0f25de3fc9b49d430 (diff)
time: Provide xtime_update()
xtime_update() takes xtime_lock write locked and calls do_timer(). Provided to replace the do_timer() calls in the architecture code. Signed-off-by: Torben Hohn <torbenh@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: johnstul@us.ibm.com Cc: yong.zhang0@gmail.com Cc: hch@infradead.org LKML-Reference: <20110127145910.23248.21379.stgit@localhost> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/time/timekeeping.c')
-rw-r--r--kernel/time/timekeeping.c13
1 files changed, 13 insertions, 0 deletions
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}