Messages in this thread Patch in this message |  | | Subject | Patch "time: Move common updates to a function" has been added to the 3.0-stable tree | | From | <> | | Date | Tue, 17 Jul 2012 15:50:00 -0700 |
| |
This is a note to let you know that I've just added the patch titled
time: Move common updates to a function
to the 3.0-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is: time-move-common-updates-to-a-function.patch and it can be found in the queue-3.0 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <stable@vger.kernel.org> know about it.
From johnstul@us.ibm.com Tue Jul 17 15:24:46 2012 From: John Stultz <johnstul@us.ibm.com> Date: Tue, 17 Jul 2012 13:33:51 -0400 Subject: time: Move common updates to a function To: stable@vger.kernel.org Cc: Thomas Gleixner <tglx@linutronix.de>, Eric Dumazet <eric.dumazet@gmail.com>, Richard Cochran <richardcochran@gmail.com>, Prarit Bhargava <prarit@redhat.com>, Linux Kernel <linux-kernel@vger.kernel.org>, John Stultz <john.stultz@linaro.org> Message-ID: <1342546438-17534-5-git-send-email-johnstul@us.ibm.com>
From: Thomas Gleixner <tglx@linutronix.de>
This is a backport of cc06268c6a87db156af2daed6e96a936b955cc82
While not a bugfix itself, it allows following fixes to backport in a more straightforward manner.
CC: Thomas Gleixner <tglx@linutronix.de> CC: Eric Dumazet <eric.dumazet@gmail.com> CC: Richard Cochran <richardcochran@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- kernel/time/timekeeping.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-)
--- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -166,6 +166,19 @@ static struct timespec total_sleep_time; */ static struct timespec raw_time; +/* must hold write on xtime_lock */ +static void timekeeping_update(bool clearntp) +{ + if (clearntp) { + timekeeper.ntp_error = 0; + ntp_clear(); + } + update_vsyscall(&xtime, &wall_to_monotonic, + timekeeper.clock, timekeeper.mult); +} + + + /* flag for if timekeeping is suspended */ int __read_mostly timekeeping_suspended; @@ -366,11 +379,7 @@ int do_settimeofday(const struct timespe xtime = *tv; - timekeeper.ntp_error = 0; - ntp_clear(); - - update_vsyscall(&xtime, &wall_to_monotonic, timekeeper.clock, - timekeeper.mult); + timekeeping_update(true); write_sequnlock_irqrestore(&xtime_lock, flags); @@ -403,11 +412,7 @@ int timekeeping_inject_offset(struct tim xtime = timespec_add(xtime, *ts); wall_to_monotonic = timespec_sub(wall_to_monotonic, *ts); - timekeeper.ntp_error = 0; - ntp_clear(); - - update_vsyscall(&xtime, &wall_to_monotonic, timekeeper.clock, - timekeeper.mult); + timekeeping_update(true); write_sequnlock_irqrestore(&xtime_lock, flags); @@ -630,10 +635,7 @@ void timekeeping_inject_sleeptime(struct __timekeeping_inject_sleeptime(delta); - timekeeper.ntp_error = 0; - ntp_clear(); - update_vsyscall(&xtime, &wall_to_monotonic, timekeeper.clock, - timekeeper.mult); + timekeeping_update(true); write_sequnlock_irqrestore(&xtime_lock, flags); @@ -938,9 +940,7 @@ static void update_wall_time(void) wall_to_monotonic.tv_sec -= leap; } - /* check to see if there is a new clocksource to use */ - update_vsyscall(&xtime, &wall_to_monotonic, timekeeper.clock, - timekeeper.mult); + timekeeping_update(false); } /**
Patches currently in stable-queue which might be from johnstul@us.ibm.com are
queue-3.0/timekeeping-fix-leapsecond-triggered-load-spike-issue.patch queue-3.0/time-move-common-updates-to-a-function.patch queue-3.0/timekeeping-fix-clock_monotonic-inconsistency-during-leapsecond.patch queue-3.0/hrtimer-update-hrtimer-base-offsets-each-hrtimer_interrupt.patch queue-3.0/timekeeping-add-missing-update-call-in-timekeeping_resume.patch queue-3.0/hrtimers-move-lock-held-region-in-hrtimer_interrupt.patch queue-3.0/hrtimer-provide-clock_was_set_delayed.patch queue-3.0/ntp-fix-leap-second-hrtimer-livelock.patch queue-3.0/timekeeping-provide-hrtimer-update-function.patch queue-3.0/timekeeping-maintain-ktime_t-based-offsets-for-hrtimers.patch queue-3.0/ntp-correct-tai-offset-during-leap-second.patch
|  |