diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-05-02 10:48:57 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-05-02 15:37:58 -0400 |
commit | b12a03ce4880bd13786a98db6de494a3e0123129 (patch) | |
tree | 2a8f2cf0d1d6749b4a33cc07c9b7839a4a139e9a /include/linux/hrtimer.h | |
parent | 942c3c5c329274fa6de5998cb911cf3d0a42d0b1 (diff) |
hrtimers: Prepare for cancel on clock was set timers
Make clock_was_set() unconditional and rename hres_timers_resume to
hrtimers_resume. This is a preparatory patch for hrtimers which are
cancelled when clock realtime was set.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/hrtimer.h')
-rw-r--r-- | include/linux/hrtimer.h | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 62f500c724f9..4135c88fe4fa 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -148,9 +148,7 @@ struct hrtimer_clock_base { | |||
148 | ktime_t resolution; | 148 | ktime_t resolution; |
149 | ktime_t (*get_time)(void); | 149 | ktime_t (*get_time)(void); |
150 | ktime_t softirq_time; | 150 | ktime_t softirq_time; |
151 | #ifdef CONFIG_HIGH_RES_TIMERS | ||
152 | ktime_t offset; | 151 | ktime_t offset; |
153 | #endif | ||
154 | }; | 152 | }; |
155 | 153 | ||
156 | enum hrtimer_base_type { | 154 | enum hrtimer_base_type { |
@@ -256,8 +254,6 @@ static inline ktime_t hrtimer_expires_remaining(const struct hrtimer *timer) | |||
256 | #ifdef CONFIG_HIGH_RES_TIMERS | 254 | #ifdef CONFIG_HIGH_RES_TIMERS |
257 | struct clock_event_device; | 255 | struct clock_event_device; |
258 | 256 | ||
259 | extern void clock_was_set(void); | ||
260 | extern void hres_timers_resume(void); | ||
261 | extern void hrtimer_interrupt(struct clock_event_device *dev); | 257 | extern void hrtimer_interrupt(struct clock_event_device *dev); |
262 | 258 | ||
263 | /* | 259 | /* |
@@ -291,16 +287,8 @@ extern void hrtimer_peek_ahead_timers(void); | |||
291 | # define MONOTONIC_RES_NSEC LOW_RES_NSEC | 287 | # define MONOTONIC_RES_NSEC LOW_RES_NSEC |
292 | # define KTIME_MONOTONIC_RES KTIME_LOW_RES | 288 | # define KTIME_MONOTONIC_RES KTIME_LOW_RES |
293 | 289 | ||
294 | /* | ||
295 | * clock_was_set() is a NOP for non- high-resolution systems. The | ||
296 | * time-sorted order guarantees that a timer does not expire early and | ||
297 | * is expired in the next softirq when the clock was advanced. | ||
298 | */ | ||
299 | static inline void clock_was_set(void) { } | ||
300 | static inline void hrtimer_peek_ahead_timers(void) { } | 290 | static inline void hrtimer_peek_ahead_timers(void) { } |
301 | 291 | ||
302 | static inline void hres_timers_resume(void) { } | ||
303 | |||
304 | /* | 292 | /* |
305 | * In non high resolution mode the time reference is taken from | 293 | * In non high resolution mode the time reference is taken from |
306 | * the base softirq time variable. | 294 | * the base softirq time variable. |
@@ -316,11 +304,13 @@ static inline int hrtimer_is_hres_active(struct hrtimer *timer) | |||
316 | } | 304 | } |
317 | #endif | 305 | #endif |
318 | 306 | ||
307 | extern void clock_was_set(void); | ||
308 | extern void hrtimers_resume(void); | ||
309 | |||
319 | extern ktime_t ktime_get(void); | 310 | extern ktime_t ktime_get(void); |
320 | extern ktime_t ktime_get_real(void); | 311 | extern ktime_t ktime_get_real(void); |
321 | extern ktime_t ktime_get_boottime(void); | 312 | extern ktime_t ktime_get_boottime(void); |
322 | 313 | ||
323 | |||
324 | DECLARE_PER_CPU(struct tick_device, tick_cpu_device); | 314 | DECLARE_PER_CPU(struct tick_device, tick_cpu_device); |
325 | 315 | ||
326 | 316 | ||