diff options
Diffstat (limited to 'kernel/hrtimer.c')
-rw-r--r-- | kernel/hrtimer.c | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 829e0664b72e..43d151f185b6 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
@@ -48,39 +48,6 @@ | |||
48 | 48 | ||
49 | #include <asm/uaccess.h> | 49 | #include <asm/uaccess.h> |
50 | 50 | ||
51 | #ifndef CONFIG_GENERIC_TIME | ||
52 | /** | ||
53 | * ktime_get - get the monotonic time in ktime_t format | ||
54 | * | ||
55 | * returns the time in ktime_t format | ||
56 | */ | ||
57 | ktime_t ktime_get(void) | ||
58 | { | ||
59 | struct timespec now; | ||
60 | |||
61 | ktime_get_ts(&now); | ||
62 | |||
63 | return timespec_to_ktime(now); | ||
64 | } | ||
65 | EXPORT_SYMBOL_GPL(ktime_get); | ||
66 | #endif | ||
67 | |||
68 | /** | ||
69 | * ktime_get_real - get the real (wall-) time in ktime_t format | ||
70 | * | ||
71 | * returns the time in ktime_t format | ||
72 | */ | ||
73 | ktime_t ktime_get_real(void) | ||
74 | { | ||
75 | struct timespec now; | ||
76 | |||
77 | getnstimeofday(&now); | ||
78 | |||
79 | return timespec_to_ktime(now); | ||
80 | } | ||
81 | |||
82 | EXPORT_SYMBOL_GPL(ktime_get_real); | ||
83 | |||
84 | /* | 51 | /* |
85 | * The timer bases: | 52 | * The timer bases: |
86 | * | 53 | * |
@@ -108,33 +75,6 @@ DEFINE_PER_CPU(struct hrtimer_cpu_base, hrtimer_bases) = | |||
108 | } | 75 | } |
109 | }; | 76 | }; |
110 | 77 | ||
111 | #ifndef CONFIG_GENERIC_TIME | ||
112 | /** | ||
113 | * ktime_get_ts - get the monotonic clock in timespec format | ||
114 | * @ts: pointer to timespec variable | ||
115 | * | ||
116 | * The function calculates the monotonic clock from the realtime | ||
117 | * clock and the wall_to_monotonic offset and stores the result | ||
118 | * in normalized timespec format in the variable pointed to by @ts. | ||
119 | */ | ||
120 | void ktime_get_ts(struct timespec *ts) | ||
121 | { | ||
122 | struct timespec tomono; | ||
123 | unsigned long seq; | ||
124 | |||
125 | do { | ||
126 | seq = read_seqbegin(&xtime_lock); | ||
127 | getnstimeofday(ts); | ||
128 | tomono = wall_to_monotonic; | ||
129 | |||
130 | } while (read_seqretry(&xtime_lock, seq)); | ||
131 | |||
132 | set_normalized_timespec(ts, ts->tv_sec + tomono.tv_sec, | ||
133 | ts->tv_nsec + tomono.tv_nsec); | ||
134 | } | ||
135 | EXPORT_SYMBOL_GPL(ktime_get_ts); | ||
136 | #endif | ||
137 | |||
138 | /* | 78 | /* |
139 | * Get the coarse grained time at the softirq based on xtime and | 79 | * Get the coarse grained time at the softirq based on xtime and |
140 | * wall_to_monotonic. | 80 | * wall_to_monotonic. |