aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/clocksource.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-12-10 01:40:31 -0500
committerPaul Mundt <lethal@linux-sh.org>2009-12-10 01:40:31 -0500
commitb5c00a3a412857d6f07970984068c450429e051c (patch)
tree1fde50630cbc24e11a45169f717f281db8eb6dcc /include/linux/clocksource.h
parentca6f2d7fafd2d48b2f6943f5c6787beaec2014d0 (diff)
parent3067e02f8f3ae2f3f02ba76400d03b8bcb4942b0 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh/for-2.6.33
Diffstat (limited to 'include/linux/clocksource.h')
-rw-r--r--include/linux/clocksource.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 83d2fbd81b93..8a4a130cc196 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,11 +281,23 @@ extern void clocksource_resume(void);
279extern struct clocksource * __init __weak clocksource_default_clock(void); 281extern struct clocksource * __init __weak clocksource_default_clock(void);
280extern void clocksource_mark_unstable(struct clocksource *cs); 282extern void clocksource_mark_unstable(struct clocksource *cs);
281 283
284extern void
285clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec);
286
287static inline void
288clocksource_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
283extern void update_vsyscall(struct timespec *ts, struct clocksource *c); 295extern void
296update_vsyscall(struct timespec *ts, struct clocksource *c, u32 mult);
284extern void update_vsyscall_tz(void); 297extern void update_vsyscall_tz(void);
285#else 298#else
286static inline void update_vsyscall(struct timespec *ts, struct clocksource *c) 299static inline void
300update_vsyscall(struct timespec *ts, struct clocksource *c, u32 mult)
287{ 301{
288} 302}
289 303