update from upstream
[linux-2.6] / arch / i386 / kernel / timers / timer_none.c
1 #include <linux/init.h>
2 #include <asm/timer.h>
3
4 static void mark_offset_none(void)
5 {
6         /* nothing needed */
7 }
8
9 static unsigned long get_offset_none(void)
10 {
11         return 0;
12 }
13
14 static unsigned long long monotonic_clock_none(void)
15 {
16         return 0;
17 }
18
19 static void delay_none(unsigned long loops)
20 {
21         int d0;
22         __asm__ __volatile__(
23                 "\tjmp 1f\n"
24                 ".align 16\n"
25                 "1:\tjmp 2f\n"
26                 ".align 16\n"
27                 "2:\tdecl %0\n\tjns 2b"
28                 :"=&a" (d0)
29                 :"0" (loops));
30 }
31
32 /* none timer_opts struct */
33 struct timer_opts timer_none = {
34         .name =         "none",
35         .mark_offset =  mark_offset_none, 
36         .get_offset =   get_offset_none,
37         .monotonic_clock =      monotonic_clock_none,
38         .delay = delay_none,
39 };