Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35911
b: refs/heads/master
c: 34464a5
h: refs/heads/master
i:
  35909: 1afccd8
  35907: 5d23cd2
  35903: 15f78d3
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Andi Kleen committed Sep 26, 2006
1 parent 2d77861 commit 8fd1aac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a549b86dd0f3cbffcd5f9343f4ae7fcd59f7e756
refs/heads/master: 34464a5b8937b79801776dfb6970c1b949fed4be
10 changes: 9 additions & 1 deletion trunk/arch/x86_64/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -1039,8 +1039,16 @@ static int timer_resume(struct sys_device *dev)
unsigned long flags;
unsigned long sec;
unsigned long ctime = get_cmos_time();
unsigned long sleep_length = (ctime - sleep_start) * HZ;
long sleep_length = (ctime - sleep_start) * HZ;

if (sleep_length < 0) {
printk(KERN_WARNING "Time skew detected in timer resume!\n");
/* The time after the resume must not be earlier than the time
* before the suspend or some nasty things will happen
*/
sleep_length = 0;
ctime = sleep_start;
}
if (vxtime.hpet_address)
hpet_reenable();
else
Expand Down

0 comments on commit 8fd1aac

Please sign in to comment.