ia64/xen-unstable

view linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/timer.h @ 8534:da7873110bbb

Tiny bootstrap cleanup.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Jan 09 19:46:46 2006 +0100 (2006-01-09)
parents 06d84bf87159
children
line source
1 #ifndef _ASMi386_TIMER_H
2 #define _ASMi386_TIMER_H
3 #include <linux/init.h>
5 /**
6 * struct timer_ops - used to define a timer source
7 *
8 * @name: name of the timer.
9 * @init: Probes and initializes the timer. Takes clock= override
10 * string as an argument. Returns 0 on success, anything else
11 * on failure.
12 * @mark_offset: called by the timer interrupt.
13 * @get_offset: called by gettimeofday(). Returns the number of microseconds
14 * since the last timer interupt.
15 * @monotonic_clock: returns the number of nanoseconds since the init of the
16 * timer.
17 * @delay: delays this many clock cycles.
18 */
19 struct timer_opts {
20 char* name;
21 void (*mark_offset)(void);
22 unsigned long (*get_offset)(void);
23 unsigned long long (*monotonic_clock)(void);
24 void (*delay)(unsigned long);
25 };
27 struct init_timer_opts {
28 int (*init)(char *override);
29 struct timer_opts *opts;
30 };
32 #define TICK_SIZE (tick_nsec / 1000)
34 extern struct timer_opts* __init select_timer(void);
35 extern void clock_fallback(void);
36 void setup_pit_timer(void);
38 /* Modifiers for buggy PIT handling */
40 extern int pit_latch_buggy;
42 extern struct timer_opts *cur_timer;
43 extern int timer_ack;
45 /* list of externed timers */
46 extern struct timer_opts timer_none;
47 extern struct timer_opts timer_pit;
48 extern struct init_timer_opts timer_pit_init;
49 extern struct init_timer_opts timer_tsc_init;
50 #ifdef CONFIG_X86_CYCLONE_TIMER
51 extern struct init_timer_opts timer_cyclone_init;
52 #endif
54 extern unsigned long calibrate_tsc(void);
55 extern void init_cpu_khz(void);
56 #ifdef CONFIG_HPET_TIMER
57 extern struct init_timer_opts timer_hpet_init;
58 extern unsigned long calibrate_tsc_hpet(unsigned long *tsc_hpet_quotient_ptr);
59 #endif
61 #ifdef CONFIG_X86_PM_TIMER
62 extern struct init_timer_opts timer_pmtmr_init;
63 #endif
64 #endif