public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT pull] timers fixes for 2.6.31
@ 2009-07-30 19:58 Thomas Gleixner
  2009-07-30 23:49 ` Linus Torvalds
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Gleixner @ 2009-07-30 19:58 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Andrew Morton, LKML

Linus,

Please pull the latest timers-fixes-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git timers-fixes-for-linus

Thanks,

	tglx

------------------>
Magnus Damm (1):
      clocksource: save mult_orig in clocksource_disable()


 include/linux/clocksource.h |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index c56457c..aff9f01 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -293,7 +293,11 @@ static inline int clocksource_enable(struct clocksource *cs)
 	if (cs->enable)
 		ret = cs->enable(cs);
 
-	/* save mult_orig on enable */
+	/* The frequency may have changed while the clocksource
+	 * was disabled. If so the code in ->enable() must update
+	 * the mult value to reflect the new frequency. Make sure
+	 * mult_orig follows this change.
+	 */
 	cs->mult_orig = cs->mult;
 
 	return ret;
@@ -309,6 +313,12 @@ static inline int clocksource_enable(struct clocksource *cs)
  */
 static inline void clocksource_disable(struct clocksource *cs)
 {
+	/* Save mult_orig in mult so clocksource_enable() can
+	 * restore the value regardless if ->enable() updates
+	 * the value of mult or not.
+	 */
+	cs->mult = cs->mult_orig;
+
 	if (cs->disable)
 		cs->disable(cs);
 }

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-08-07 20:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-30 19:58 [GIT pull] timers fixes for 2.6.31 Thomas Gleixner
2009-07-30 23:49 ` Linus Torvalds
2009-07-31 10:45   ` Peter Zijlstra
2009-07-31 12:37   ` Ingo Molnar
2009-07-31 16:40     ` H. Peter Anvin
2009-08-06 22:36     ` john stultz
2009-08-07  8:18       ` Martin Schwidefsky
2009-08-07 20:28         ` john stultz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox