ia64/xen-unstable

view xen/include/asm-x86/time.h @ 18051:79517ed2a108

x86: PIT broadcast to fix local APIC timer stop issue for Deep C state

Local APIC timer may stop at deep C state (C3/C4...) entry. Initial
HPET broadcast working in legacy replacing mode, broke RTC intr, so
was bypassed. This patch add the logic that use platform timer (PIT)
to reenable local APIC timer at C state entry/exit.

Currently, only keep PIT enabled with 100Hz freq. The next step is
trying to dynamically enable/disable PIT while needed, and give it
lower freq.

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Tian Kevin <kevin.tian@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Jul 14 10:43:32 2008 +0100 (2008-07-14)
parents 2d761ca771fb
children 2312cc25232b
line source
2 #ifndef __X86_TIME_H__
3 #define __X86_TIME_H__
5 #include <asm/msr.h>
7 void calibrate_tsc_bp(void);
8 void calibrate_tsc_ap(void);
10 typedef u64 cycles_t;
12 static inline cycles_t get_cycles(void)
13 {
14 cycles_t c;
15 rdtscll(c);
16 return c;
17 }
19 unsigned long
20 mktime (unsigned int year, unsigned int mon,
21 unsigned int day, unsigned int hour,
22 unsigned int min, unsigned int sec);
24 int time_suspend(void);
25 int time_resume(void);
27 void init_percpu_time(void);
29 struct ioreq;
30 int dom0_pit_access(struct ioreq *ioreq);
32 int cpu_frequency_change(u64 freq);
34 struct tm;
35 struct tm wallclock_time(void);
37 void pit_broadcast_enter(void);
38 void pit_broadcast_exit(void);
39 int pit_broadcast_is_available(void);
41 #endif /* __X86_TIME_H__ */