Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19766
b: refs/heads/master
c: 0dd2ea9
h: refs/heads/master
v: v3
  • Loading branch information
Shaohua Li authored and Linus Torvalds committed Feb 5, 2006
1 parent b9e74c7 commit 6d785fb
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6f3814cd2fb5ea4d53a7fa5b0635d68fa4036c1b
refs/heads/master: 0dd2ea9af8f0eca43cf6200baa182b3aba307049
5 changes: 5 additions & 0 deletions trunk/arch/x86_64/kernel/pmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ int pmtimer_mark_offset(void)
return lost - 1;
}

void pmtimer_resume(void)
{
last_pmtmr_tick = inl(pmtmr_ioport);
}

unsigned int do_gettimeoffset_pm(void)
{
u32 now, offset, delta = 0;
Expand Down
12 changes: 12 additions & 0 deletions trunk/arch/x86_64/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -1047,9 +1047,21 @@ static int timer_resume(struct sys_device *dev)
write_seqlock_irqsave(&xtime_lock,flags);
xtime.tv_sec = sec;
xtime.tv_nsec = 0;
if (vxtime.mode == VXTIME_HPET) {
if (hpet_use_timer)
vxtime.last = hpet_readl(HPET_T0_CMP) - hpet_tick;
else
vxtime.last = hpet_readl(HPET_COUNTER);
#ifdef CONFIG_X86_PM_TIMER
} else if (vxtime.mode == VXTIME_PMTMR) {
pmtimer_resume();
#endif
} else
vxtime.last_tsc = get_cycles_sync();
write_sequnlock_irqrestore(&xtime_lock,flags);
jiffies += sleep_length;
wall_jiffies += sleep_length;
monotonic_base += sleep_length * (NSEC_PER_SEC/HZ);
touch_softlockup_watchdog();
return 0;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-x86_64/proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ extern void iommu_hole_init(void);

extern void time_init_gtod(void);
extern int pmtimer_mark_offset(void);
extern void pmtimer_resume(void);
extern unsigned int do_gettimeoffset_pm(void);
#ifdef CONFIG_X86_PM_TIMER
extern u32 pmtmr_ioport;
Expand Down

0 comments on commit 6d785fb

Please sign in to comment.