Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
clocksource: Save mult_orig in clocksource_disable()

+13 -1
+13 -1
include/linux/clocksource.h
··· 293 293 if (cs->enable) 294 294 ret = cs->enable(cs); 295 295 296 - /* save mult_orig on enable */ 296 + /* 297 + * The frequency may have changed while the clocksource 298 + * was disabled. If so the code in ->enable() must update 299 + * the mult value to reflect the new frequency. Make sure 300 + * mult_orig follows this change. 301 + */ 297 302 cs->mult_orig = cs->mult; 298 303 299 304 return ret; ··· 314 309 */ 315 310 static inline void clocksource_disable(struct clocksource *cs) 316 311 { 312 + /* 313 + * Save mult_orig in mult so clocksource_enable() can 314 + * restore the value regardless if ->enable() updates 315 + * the value of mult or not. 316 + */ 317 + cs->mult = cs->mult_orig; 318 + 317 319 if (cs->disable) 318 320 cs->disable(cs); 319 321 }