Skip to content

Commit

Permalink
time: Clean up warp_clock()
Browse files Browse the repository at this point in the history
warp_clock() currently accesses timekeeping internal state directly, which
is unnecessary.  Convert it to use the proper timekeeping interfaces.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
John Stultz authored and Thomas Gleixner committed Mar 12, 2010
1 parent c287393 commit 64ce4c2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,11 @@ SYSCALL_DEFINE2(gettimeofday, struct timeval __user *, tv,
*/
static inline void warp_clock(void)
{
write_seqlock_irq(&xtime_lock);
wall_to_monotonic.tv_sec -= sys_tz.tz_minuteswest * 60;
xtime.tv_sec += sys_tz.tz_minuteswest * 60;
update_xtime_cache(0);
write_sequnlock_irq(&xtime_lock);
clock_was_set();
struct timespec delta, adjust;
delta.tv_sec = sys_tz.tz_minuteswest * 60;
delta.tv_nsec = 0;
adjust = timespec_add_safe(current_kernel_time(), delta);
do_settimeofday(&adjust);
}

/*
Expand Down

0 comments on commit 64ce4c2

Please sign in to comment.