[PATCH] add suspend/resume for timer

The timers lack .suspend/.resume methods.  Because of this, jiffies got a
big compensation after a S3 resume.  And then softlockup watchdog reports
an oops.  This occured with HPET enabled, but it's also possible for other
timers.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Shaohua Li
2005-09-03 15:57:07 -07:00
committed by Linus Torvalds
parent 57c4ce3cbf
commit c3c433e4f3
6 changed files with 50 additions and 27 deletions

View File

@ -1,6 +1,7 @@
#ifndef _ASMi386_TIMER_H
#define _ASMi386_TIMER_H
#include <linux/init.h>
#include <linux/pm.h>
/**
* struct timer_ops - used to define a timer source
@ -23,6 +24,8 @@ struct timer_opts {
unsigned long long (*monotonic_clock)(void);
void (*delay)(unsigned long);
unsigned long (*read_timer)(void);
int (*suspend)(pm_message_t state);
int (*resume)(void);
};
struct init_timer_opts {