Messages in this thread Patch in this message | | | From | Torben Hohn <> | Subject | [PATCH 02/18] provide xtime_update() which does not require holding xtime_lock like do_timer() | Date | Sat, 22 Jan 2011 00:06:48 +0100 |
| |
some arch code failed to lock the xtime_lock. and some code looks like its using the xtime_lock to protect other stuff.
this prepares the cleanup of this code.
Signed-off-by: Torben Hohn <torbenh@gmx.de> --- include/linux/sched.h | 1 + kernel/time/timekeeping.c | 9 +++++++++ 2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/include/linux/sched.h b/include/linux/sched.h index d747f94..9d9a078 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2050,6 +2050,7 @@ extern void release_uids(struct user_namespace *ns); #include <asm/current.h> extern void do_timer(unsigned long ticks); +extern void xtime_update(unsigned long ticks); extern int wake_up_state(struct task_struct *tsk, unsigned int state); extern int wake_up_process(struct task_struct *tsk); diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 546d82f..2deef94 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -958,3 +958,12 @@ void do_timer(unsigned long ticks) update_wall_time(); calc_global_load(ticks); } + +/* xtime_update - updates the timer infrastructure. + */ +void xtime_update(unsigned long ticks) +{ + write_seqlock(&xtime_lock); + do_timer(ticks); + write_sequnlock(&xtime_lock); +} -- 1.7.2.3
| |