diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2007-03-06 08:25:42 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-06 09:30:24 -0800 |
commit | 6321dd60c76b2e12383bc06046288b15397ed3a0 (patch) | |
tree | 4cea63e69ce4f6f5f7f94fc6905063efdde7974e /kernel/timer.c | |
parent | c3442e296517aee733d62fc3fe03211598902c7d (diff) | |
download | op-kernel-dev-6321dd60c76b2e12383bc06046288b15397ed3a0.zip op-kernel-dev-6321dd60c76b2e12383bc06046288b15397ed3a0.tar.gz |
[PATCH] Save/restore periodic tick information over suspend/resume
The programming of periodic tick devices needs to be saved/restored
across suspend/resume - otherwise we might end up with a system coming
up that relies on getting a PIT (or HPET) interrupt, while those devices
default to 'no interrupts' after powerup. (To confuse things it worked
to a certain degree on some systems because the lapic gets initialized
as a side-effect of SMP bootup.)
This suspend / resume thing was dropped unintentionally during the
last-minute -mm code reshuffling.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/timer.c')
-rw-r--r-- | kernel/timer.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index 8ad3842..ee0a2da 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -997,6 +997,9 @@ static int timekeeping_resume(struct sys_device *dev) write_sequnlock_irqrestore(&xtime_lock, flags); touch_softlockup_watchdog(); + + clockevents_notify(CLOCK_EVT_NOTIFY_RESUME, NULL); + /* Resume hrtimers */ clock_was_set(); @@ -1011,6 +1014,9 @@ static int timekeeping_suspend(struct sys_device *dev, pm_message_t state) timekeeping_suspended = 1; timekeeping_suspend_time = read_persistent_clock(); write_sequnlock_irqrestore(&xtime_lock, flags); + + clockevents_notify(CLOCK_EVT_NOTIFY_SUSPEND, NULL); + return 0; } |