diff options
| author | Li Shaohua <shaohua.li@intel.com> | 2005-01-04 05:28:15 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-04 05:28:15 -0800 |
| commit | bb51bc5933d82005cf0625eaaaa16f7df1011ece (patch) | |
| tree | a153e149d7924d7b66c5f4b81ec79230b0f65503 | |
| parent | 90b8f3acdf04b44c5e0e93488f43b897a9db312f (diff) | |
[PATCH] time runx too fast after S3
After resume from S3, 'date' shows time run too fast.
Signed-off-by: Li Shaohua <shaohua.li@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| -rw-r--r-- | arch/i386/kernel/time.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c index 661c1fc771dd..c7ddb1d0fe0d 100644 --- a/arch/i386/kernel/time.c +++ b/arch/i386/kernel/time.c @@ -342,12 +342,13 @@ static int timer_resume(struct sys_device *dev) hpet_reenable(); #endif sec = get_cmos_time() + clock_cmos_diff; - sleep_length = get_cmos_time() - sleep_start; + sleep_length = (get_cmos_time() - sleep_start) * HZ; write_seqlock_irqsave(&xtime_lock, flags); xtime.tv_sec = sec; xtime.tv_nsec = 0; write_sequnlock_irqrestore(&xtime_lock, flags); - jiffies += sleep_length * HZ; + jiffies += sleep_length; + wall_jiffies += sleep_length; return 0; } |
