diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 22:27:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 22:27:08 -0500 |
commit | 60d8ce2cd6c283132928c11f3fd57ff4187287e0 (patch) | |
tree | 36d08a2ead7a7d8c3c081d484215ccca00bf6aab /include/linux/clocksource.h | |
parent | 849e8dea099aafa56db9e74b580b0d858b956533 (diff) | |
parent | feae3203d711db0a9965300ee6d592257fdaae4f (diff) |
Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
timers, init: Limit the number of per cpu calibration bootup messages
posix-cpu-timers: optimize and document timer_create callback
clockevents: Add missing include to pacify sparse
x86: vmiclock: Fix printk format
x86: Fix printk format due to variable type change
sparc: fix printk for change of variable type
clocksource/events: Fix fallout of generic code changes
nohz: Allow 32-bit machines to sleep for more than 2.15 seconds
nohz: Track last do_timer() cpu
nohz: Prevent clocksource wrapping during idle
nohz: Type cast printk argument
mips: Use generic mult/shift factor calculation for clocks
clocksource: Provide a generic mult/shift factor calculation
clockevents: Use u32 for mult and shift factors
nohz: Introduce arch_needs_cpu
nohz: Reuse ktime in sub-functions of tick_check_idle.
time: Remove xtime_cache
time: Implement logarithmic time accumulation
Diffstat (limited to 'include/linux/clocksource.h')
-rw-r--r-- | include/linux/clocksource.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 83d2fbd81b9..279c5478e8a 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -151,6 +151,7 @@ extern u64 timecounter_cyc2time(struct timecounter *tc, | |||
151 | * subtraction of non 64 bit counters | 151 | * subtraction of non 64 bit counters |
152 | * @mult: cycle to nanosecond multiplier | 152 | * @mult: cycle to nanosecond multiplier |
153 | * @shift: cycle to nanosecond divisor (power of two) | 153 | * @shift: cycle to nanosecond divisor (power of two) |
154 | * @max_idle_ns: max idle time permitted by the clocksource (nsecs) | ||
154 | * @flags: flags describing special properties | 155 | * @flags: flags describing special properties |
155 | * @vread: vsyscall based read | 156 | * @vread: vsyscall based read |
156 | * @resume: resume function for the clocksource, if necessary | 157 | * @resume: resume function for the clocksource, if necessary |
@@ -168,6 +169,7 @@ struct clocksource { | |||
168 | cycle_t mask; | 169 | cycle_t mask; |
169 | u32 mult; | 170 | u32 mult; |
170 | u32 shift; | 171 | u32 shift; |
172 | u64 max_idle_ns; | ||
171 | unsigned long flags; | 173 | unsigned long flags; |
172 | cycle_t (*vread)(void); | 174 | cycle_t (*vread)(void); |
173 | void (*resume)(void); | 175 | void (*resume)(void); |
@@ -279,6 +281,16 @@ extern void clocksource_resume(void); | |||
279 | extern struct clocksource * __init __weak clocksource_default_clock(void); | 281 | extern struct clocksource * __init __weak clocksource_default_clock(void); |
280 | extern void clocksource_mark_unstable(struct clocksource *cs); | 282 | extern void clocksource_mark_unstable(struct clocksource *cs); |
281 | 283 | ||
284 | extern void | ||
285 | clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec); | ||
286 | |||
287 | static inline void | ||
288 | clocksource_calc_mult_shift(struct clocksource *cs, u32 freq, u32 minsec) | ||
289 | { | ||
290 | return clocks_calc_mult_shift(&cs->mult, &cs->shift, freq, | ||
291 | NSEC_PER_SEC, minsec); | ||
292 | } | ||
293 | |||
282 | #ifdef CONFIG_GENERIC_TIME_VSYSCALL | 294 | #ifdef CONFIG_GENERIC_TIME_VSYSCALL |
283 | extern void update_vsyscall(struct timespec *ts, struct clocksource *c); | 295 | extern void update_vsyscall(struct timespec *ts, struct clocksource *c); |
284 | extern void update_vsyscall_tz(void); | 296 | extern void update_vsyscall_tz(void); |