History

clocksource: fix resume logic

We need to make sure that the clocksources are resumed, when timekeeping is resumed. The current resume logic does not guarantee this. Add a resume function pointer to the clocksource struct, so clocksource drivers which need to reinitialize the clocksource can provide a resume function. Add a resume function, which calls the maybe available clocksource resume functions and resets the watchdog function, so a stable TSC can be used accross suspend/resume.

Thomas Gleixner committed 19 years ago

Commit b52f52a1 parent 4037d453 files · +50 −0Browse files

Showing the changes to kernel/timer.c (1 of 3 files). Show all

Unified · Split

kernel/timer.c+2−0
@@ -1499,6 +1499,8 @@ unregister_time_interpolator(struct time_interpolator *ti) · 1498 unmodified lines
1499 prev = &curr->next;1499 prev = &curr->next;
1500 }1500 }
1501 1501
1502 clocksource_resume();
1503
1502 write_seqlock_irqsave(&xtime_lock, flags);1504 write_seqlock_irqsave(&xtime_lock, flags);
1503 if (ti == time_interpolator) {1505 if (ti == time_interpolator) {
1504 /* we lost the best time-interpolator: */1506 /* we lost the best time-interpolator: */