We now have two implementations for the timer API: one using the time-of-day counter at 40:70 and one using RDTSC. Both make use of timer2_udelay().tags/v0.9.6
|
|
||
|
1 |
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
|
9 |
|
|
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
|
|
|
15 |
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
|
|
|
45 |
|
|
|
46 |
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
|
|
|
56 |
|
|
|
57 |
|
|
|
58 |
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
|
|
|
73 |
|
|
|
74 |
|
|
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
|
|
|
82 |
|
|
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
|
87 |
|
|
|
||
12 |
|
12 |
|
13 |
|
13 |
|
14 |
|
14 |
|
15 |
|
|
|
16 |
|
|
|
|
15 |
|
|
17 |
|
16 |
|
18 |
|
17 |
|
19 |
|
18 |
|
20 |
|
|
|
|
19 |
|
|
21 |
|
20 |
|
22 |
|
21 |
|
23 |
|
22 |
|
|
|
||
52 |
|
51 |
|
53 |
|
52 |
|
54 |
|
53 |
|
55 |
|
|
|
56 |
|
|
|
|
54 |
|
|
57 |
|
55 |
|
58 |
|
56 |
|
59 |
|
57 |
|
|
|
||
75 |
|
73 |
|
76 |
|
74 |
|
77 |
|
75 |
|
78 |
|
|
|
79 |
|
|
|
|
76 |
|
|
80 |
|
77 |
|
81 |
|
78 |
|
82 |
|
79 |
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
|
87 |
|
|
|
|
80 |
|
|
|
81 |
|
|
|
82 |
|
|
|
83 |
|
|
|
84 |
|
|
88 |
|
85 |
|
89 |
|
|
|
|
||
1 |
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
|
9 |
|
|
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
|
|
|
15 |
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
|
|
|
45 |
|
|
|
46 |
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
|
|
|
56 |
|
|
|
57 |
|
|
|
|
||
1 |
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |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
||
18 |
|
16 |
|
19 |
|
17 |
|
20 |
|
18 |
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
|
|
|
45 |
|
|
|
46 |
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
|
|
|
56 |
|
|
|
57 |
|
|
|
58 |
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
|
|
|
73 |
|
|
|
74 |
|
|
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
|
|
|
82 |
|
|
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
|
87 |
|
|
|
88 |
|
|
|
89 |
|
|
|
90 |
|
|
|
91 |
|
|
|
92 |
|
|
|
|
19 |
|
|
93 |
|
20 |
|
94 |
|
21 |
|
95 |
|
|
|
|
22 |
|
|
96 |
|
23 |
|
97 |
|
|
|
|
24 |
|
|
98 |
|
25 |
|
99 |
|
|
|
|
26 |
|
|
100 |
|
27 |
|
101 |
|
|
|
|
28 |
|
|
102 |
|
29 |
|
103 |
|
30 |
|
104 |
|
31 |
|
105 |
|
|
|
|
32 |
|
|
106 |
|
33 |
|
107 |
|
|
|
|
34 |
|
|
108 |
|
35 |
|
109 |
|
36 |
|
110 |
|
37 |
|
111 |
|
|
|
|
38 |
|
|
112 |
|
39 |
|
113 |
|
40 |
|
|
|
||
497 |
|
497 |
|
498 |
|
498 |
|
499 |
|
499 |
|
500 |
|
|
|
|
500 |
|
|
501 |
|
501 |
|
502 |
|
502 |
|
503 |
|
503 |
|
|
|
||
543 |
|
543 |
|
544 |
|
544 |
|
545 |
|
545 |
|
546 |
|
|
|
|
546 |
|
|
547 |
|
547 |
|
548 |
|
548 |
|
549 |
|
549 |
|
|
|
||
407 |
|
407 |
|
408 |
|
408 |
|
409 |
|
409 |
|
410 |
|
|
|
|
410 |
|
|
411 |
|
411 |
|
412 |
|
412 |
|
413 |
|
413 |
|
|
|
||
448 |
|
448 |
|
449 |
|
449 |
|
450 |
|
450 |
|
451 |
|
|
|
|
451 |
|
|
452 |
|
452 |
|
453 |
|
453 |
|
454 |
|
454 |
|
|
|
||
608 |
|
608 |
|
609 |
|
609 |
|
610 |
|
610 |
|
611 |
|
|
|
|
611 |
|
|
612 |
|
612 |
|
613 |
|
613 |
|
614 |
|
614 |
|
|
|
||
753 |
|
753 |
|
754 |
|
754 |
|
755 |
|
755 |
|
756 |
|
|
|
|
756 |
|
|
757 |
|
757 |
|
758 |
|
758 |
|
759 |
|
759 |
|
|
|
||
309 |
|
309 |
|
310 |
|
310 |
|
311 |
|
311 |
|
312 |
|
|
|
|
312 |
|
|
313 |
|
313 |
|
314 |
|
314 |
|
315 |
|
315 |
|
|
|
||
352 |
|
352 |
|
353 |
|
353 |
|
354 |
|
354 |
|
355 |
|
|
|
|
355 |
|
|
356 |
|
356 |
|
357 |
|
357 |
|
358 |
|
358 |
|
|
|
||
784 |
|
784 |
|
785 |
|
785 |
|
786 |
|
786 |
|
787 |
|
|
|
|
787 |
|
|
788 |
|
788 |
|
789 |
|
789 |
|
790 |
|
790 |
|
|
|
||
800 |
|
800 |
|
801 |
|
801 |
|
802 |
|
802 |
|
803 |
|
|
|
|
803 |
|
|
804 |
|
804 |
|
805 |
|
805 |
|
806 |
|
806 |
|
|
|
||
825 |
|
825 |
|
826 |
|
826 |
|
827 |
|
827 |
|
828 |
|
|
|
|
828 |
|
|
829 |
|
829 |
|
830 |
|
830 |
|
831 |
|
831 |
|
|
|
||
842 |
|
842 |
|
843 |
|
843 |
|
844 |
|
844 |
|
845 |
|
|
|
|
845 |
|
|
846 |
|
846 |
|
847 |
|
847 |
|
848 |
|
848 |
|
|
|
||
872 |
|
872 |
|
873 |
|
873 |
|
874 |
|
874 |
|
875 |
|
|
|
|
875 |
|
|
876 |
|
876 |
|
877 |
|
877 |
|
878 |
|
878 |
|
|
|
||
1346 |
|
1346 |
|
1347 |
|
1347 |
|
1348 |
|
1348 |
|
1349 |
|
|
|
|
1349 |
|
|
1350 |
|
1350 |
|
1351 |
|
1351 |
|
1352 |
|
1352 |
|
|
|
||
1390 |
|
1390 |
|
1391 |
|
1391 |
|
1392 |
|
1392 |
|
1393 |
|
|
|
|
1393 |
|
|
1394 |
|
1394 |
|
1395 |
|
1395 |
|
1396 |
|
1396 |
|
|
|
||
112 |
|
112 |
|
113 |
|
113 |
|
114 |
|
114 |
|
115 |
|
|
|
|
115 |
|
|
116 |
|
116 |
|
117 |
|
117 |
|
118 |
|
118 |
|
|
|
||
486 |
|
486 |
|
487 |
|
487 |
|
488 |
|
488 |
|
489 |
|
|
|
|
489 |
|
|
490 |
|
490 |
|
491 |
|
491 |
|
492 |
|
492 |
|
|
|
||
1 |
|
|
|
2 |
|
|
|
|
1 |
|
|
|
2 |
|
|
3 |
|
3 |
|
4 |
|
|
|
5 |
|
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
|
9 |
|
|
|
10 |
|
|
6 |
|
11 |
|
7 |
|
|
|
|
12 |
|
|
|
13 |
|
|
8 |
|
14 |
|
9 |
|
|
|
10 |
|
|
|
11 |
|
|
|
|
15 |
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
12 |
|
24 |
|
13 |
|
|
|
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
14 |
|
34 |
|
15 |
|
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
|
|
|
38 |
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
16 |
|
43 |
|
17 |
|
|
|
|
44 |
|
|
18 |
|
45 |
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
|
36 |
|
|
|
|
46 |
|
|
|
47 |
|
|
37 |
|
48 |
|
38 |
|
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
|
54 |
|
|
39 |
|
55 |
|
40 |
|
|
|
|
56 |
|
|
|
57 |
|
|
|
58 |
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
|
|
41 |
|
62 |
|
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
|
|
|
73 |
|
|
|
||
4 |
|
4 |
|
5 |
|
5 |
|
6 |
|
6 |
|
7 |
|
|
|
8 |
|
7 |
|
9 |
|
8 |
|
10 |
|
9 |
|
|
|
||
22 |
|
21 |
|
23 |
|
22 |
|
24 |
|
23 |
|
25 |
|
|
|
26 |
|
|
|
|
24 |
|
|
|
25 |
|
|
27 |
|
26 |
|
28 |
|
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
29 |
|
36 |
|
|
37 |
|
|
|
38 |
|
|
|
39 |
|
|
30 |
|
40 |
|
31 |
|
41 |
|