diff options
Diffstat (limited to 'include/linux/clocksource.h')
| -rw-r--r-- | include/linux/clocksource.h | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 4bca8b60cdf7..c37b21ad5a3b 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
| @@ -273,7 +273,6 @@ static inline s64 clocksource_cyc2ns(cycle_t cycles, u32 mult, u32 shift) | |||
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | 275 | ||
| 276 | /* used to install a new clocksource */ | ||
| 277 | extern int clocksource_register(struct clocksource*); | 276 | extern int clocksource_register(struct clocksource*); |
| 278 | extern void clocksource_unregister(struct clocksource*); | 277 | extern void clocksource_unregister(struct clocksource*); |
| 279 | extern void clocksource_touch_watchdog(void); | 278 | extern void clocksource_touch_watchdog(void); |
| @@ -287,6 +286,35 @@ extern void clocksource_mark_unstable(struct clocksource *cs); | |||
| 287 | extern void | 286 | extern void |
| 288 | clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec); | 287 | clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec); |
| 289 | 288 | ||
| 289 | /* | ||
| 290 | * Don't call __clocksource_register_scale directly, use | ||
| 291 | * clocksource_register_hz/khz | ||
| 292 | */ | ||
| 293 | extern int | ||
| 294 | __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq); | ||
| 295 | extern void | ||
| 296 | __clocksource_updatefreq_scale(struct clocksource *cs, u32 scale, u32 freq); | ||
| 297 | |||
| 298 | static inline int clocksource_register_hz(struct clocksource *cs, u32 hz) | ||
| 299 | { | ||
| 300 | return __clocksource_register_scale(cs, 1, hz); | ||
| 301 | } | ||
| 302 | |||
| 303 | static inline int clocksource_register_khz(struct clocksource *cs, u32 khz) | ||
| 304 | { | ||
| 305 | return __clocksource_register_scale(cs, 1000, khz); | ||
| 306 | } | ||
| 307 | |||
| 308 | static inline void __clocksource_updatefreq_hz(struct clocksource *cs, u32 hz) | ||
| 309 | { | ||
| 310 | __clocksource_updatefreq_scale(cs, 1, hz); | ||
| 311 | } | ||
| 312 | |||
| 313 | static inline void __clocksource_updatefreq_khz(struct clocksource *cs, u32 khz) | ||
| 314 | { | ||
| 315 | __clocksource_updatefreq_scale(cs, 1000, khz); | ||
| 316 | } | ||
| 317 | |||
| 290 | static inline void | 318 | static inline void |
| 291 | clocksource_calc_mult_shift(struct clocksource *cs, u32 freq, u32 minsec) | 319 | clocksource_calc_mult_shift(struct clocksource *cs, u32 freq, u32 minsec) |
| 292 | { | 320 | { |
| @@ -296,11 +324,13 @@ clocksource_calc_mult_shift(struct clocksource *cs, u32 freq, u32 minsec) | |||
| 296 | 324 | ||
| 297 | #ifdef CONFIG_GENERIC_TIME_VSYSCALL | 325 | #ifdef CONFIG_GENERIC_TIME_VSYSCALL |
| 298 | extern void | 326 | extern void |
| 299 | update_vsyscall(struct timespec *ts, struct clocksource *c, u32 mult); | 327 | update_vsyscall(struct timespec *ts, struct timespec *wtm, |
| 328 | struct clocksource *c, u32 mult); | ||
| 300 | extern void update_vsyscall_tz(void); | 329 | extern void update_vsyscall_tz(void); |
| 301 | #else | 330 | #else |
| 302 | static inline void | 331 | static inline void |
| 303 | update_vsyscall(struct timespec *ts, struct clocksource *c, u32 mult) | 332 | update_vsyscall(struct timespec *ts, struct timespec *wtm, |
| 333 | struct clocksource *c, u32 mult) | ||
| 304 | { | 334 | { |
| 305 | } | 335 | } |
| 306 | 336 | ||
