6b13f685e
김민수
BSP 최초 추가
|
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
#ifndef _LINUX_TIMEKEEPER_INTERNAL_H
#define _LINUX_TIMEKEEPER_INTERNAL_H
#include <linux/clocksource.h>
#include <linux/jiffies.h>
#include <linux/time.h>
struct timekeeper {
struct clocksource *clock;
u32 mult;
u32 shift;
cycle_t cycle_interval;
cycle_t cycle_last;
u64 xtime_interval;
s64 xtime_remainder;
u32 raw_interval;
u64 xtime_sec;
u64 xtime_nsec;
s64 ntp_error;
u32 ntp_error_shift;
struct timespec wall_to_monotonic;
ktime_t offs_real;
struct timespec total_sleep_time;
ktime_t offs_boot;
struct timespec raw_time;
s32 tai_offset;
ktime_t offs_tai;
};
static inline struct timespec tk_xtime(struct timekeeper *tk)
{
struct timespec ts;
ts.tv_sec = tk->xtime_sec;
ts.tv_nsec = (long)(tk->xtime_nsec >> tk->shift);
return ts;
}
#ifdef CONFIG_GENERIC_TIME_VSYSCALL
extern void update_vsyscall(struct timekeeper *tk);
extern void update_vsyscall_tz(void);
#elif defined(CONFIG_GENERIC_TIME_VSYSCALL_OLD)
extern void update_vsyscall_old(struct timespec *ts, struct timespec *wtm,
struct clocksource *c, u32 mult);
extern void update_vsyscall_tz(void);
static inline void update_vsyscall(struct timekeeper *tk)
{
struct timespec xt;
xt = tk_xtime(tk);
update_vsyscall_old(&xt, &tk->wall_to_monotonic, tk->clock, tk->mult);
}
#else
static inline void update_vsyscall(struct timekeeper *tk)
{
}
static inline void update_vsyscall_tz(void)
{
}
#endif
#endif /* _LINUX_TIMEKEEPER_INTERNAL_H */
|