From: Linus Torvalds Date: Wed, 9 Dec 2009 03:28:09 +0000 (-0800) Subject: Merge branch 'timers-for-linus-urgent' of git://git.kernel.org/pub/scm/linux/kernel... X-Git-Url: https://git.kernelconcepts.de/?a=commitdiff_plain;h=fbf07eac7bf21c262143194181bd97c5d18b8ceb;p=mv-sheeva.git Merge branch 'timers-for-linus-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'timers-for-linus-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: hrtimer: Fix /proc/timer_list regression itimers: Fix racy writes to cpu_itimer fields timekeeping: Fix clock_gettime vsyscall time warp --- fbf07eac7bf21c262143194181bd97c5d18b8ceb diff --cc include/linux/clocksource.h index 279c5478e8a,95e4995d998..8a4a130cc19 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@@ -281,21 -279,13 +281,23 @@@ extern void clocksource_resume(void) extern struct clocksource * __init __weak clocksource_default_clock(void); extern void clocksource_mark_unstable(struct clocksource *cs); +extern void +clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec); + +static inline void +clocksource_calc_mult_shift(struct clocksource *cs, u32 freq, u32 minsec) +{ + return clocks_calc_mult_shift(&cs->mult, &cs->shift, freq, + NSEC_PER_SEC, minsec); +} + #ifdef CONFIG_GENERIC_TIME_VSYSCALL - extern void update_vsyscall(struct timespec *ts, struct clocksource *c); + extern void + update_vsyscall(struct timespec *ts, struct clocksource *c, u32 mult); extern void update_vsyscall_tz(void); #else - static inline void update_vsyscall(struct timespec *ts, struct clocksource *c) + static inline void + update_vsyscall(struct timespec *ts, struct clocksource *c, u32 mult) { } diff --cc kernel/time/timekeeping.c index d1aebd73b19,2a6d3e3e2c3..af4135f0582 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@@ -839,8 -807,11 +839,8 @@@ void update_wall_time(void timekeeper.ntp_error += timekeeper.xtime_nsec << timekeeper.ntp_error_shift; - nsecs = clocksource_cyc2ns(offset, timekeeper.mult, timekeeper.shift); - update_xtime_cache(nsecs); - /* check to see if there is a new clocksource to use */ - update_vsyscall(&xtime, timekeeper.clock); + update_vsyscall(&xtime, timekeeper.clock, timekeeper.mult); } /**