ia64/xen-unstable

view xen/include/asm-ia64/time.h @ 10685:8ad37880564d

[IA64] emulate PAL_HALT_LIGHT on domU

This patch emulates Guest PAL_HALT_LIGHT on domU by using do_block and timer.
It also adds the function of the timer interrupt to domU at the vcpu woke up.

Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
[warning fixes and static inlining]
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild.aw
date Mon Jul 10 13:12:41 2006 -0600 (2006-07-10)
parents 854cfcbef774
children b2abc70be89e
line source
1 #ifndef _XEN_IA64_TIME_H
2 #define _XEN_IA64_TIME_H
4 #include <asm/linux/time.h>
5 #include <asm/timex.h>
7 extern unsigned long itc_scale;
8 extern unsigned long ns_scale;
10 /* We don't expect an absolute cycle value here, since then no way
11 * to prevent overflow for large norminator. Normally this conversion
12 * is used for relative offset.
13 */
14 static inline u64
15 cycle_to_ns(u64 cycle)
16 {
17 return (cycle * itc_scale) >> 32;
18 }
20 static inline u64
21 ns_to_cycle(u64 ns)
22 {
23 return (ns * ns_scale) >> 32;
24 }
26 #endif /* _XEN_IA64_TIME_H */