X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=kernel%2Ftime%2Ftimekeeping.c;h=e91c29f961c900d7739c0dc2f27b81c480cdb55c;hb=414f746d232d41ed6ae8632c4495ae795373c44b;hp=a26429bc772a4093507360fa4fbb90a7c12b8483;hpb=7fc5c78409479d826341b103bdf734cb4fb02436;p=~andy%2Flinux diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index a26429bc772..e91c29f961c 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -53,7 +53,7 @@ void update_xtime_cache(u64 nsec) timespec_add_ns(&xtime_cache, nsec); } -static struct clocksource *clock; /* pointer to current clocksource */ +struct clocksource *clock; #ifdef CONFIG_GENERIC_TIME @@ -246,7 +246,7 @@ void __init timekeeping_init(void) write_seqlock_irqsave(&xtime_lock, flags); - ntp_clear(); + ntp_init(); clock = clocksource_get_next(); clocksource_calculate_interval(clock, NTP_INTERVAL_LENGTH); @@ -380,8 +380,7 @@ static __always_inline int clocksource_bigadjust(s64 error, s64 *interval, * Now calculate the error in (1 << look_ahead) ticks, but first * remove the single look ahead already included in the error. */ - tick_error = current_tick_length() >> - (NTP_SCALE_SHIFT - clock->shift + 1); + tick_error = tick_length >> (NTP_SCALE_SHIFT - clock->shift + 1); tick_error -= clock->xtime_interval >> 1; error = ((error - tick_error) >> look_ahead) + tick_error; @@ -473,7 +472,7 @@ void update_wall_time(void) } /* accumulate error between NTP and clock interval */ - clock->error += current_tick_length(); + clock->error += tick_length; clock->error -= clock->xtime_interval << (NTP_SCALE_SHIFT - clock->shift); }