parisc: convert /proc/pdc/{lcd,led} to seq_file
[safe/jmp/linux-2.6] / include / linux / clocksource.h
index e12e309..8a4a130 100644 (file)
@@ -149,9 +149,9 @@ extern u64 timecounter_cyc2time(struct timecounter *tc,
  * @disable:           optional function to disable the clocksource
  * @mask:              bitmask for two's complement
  *                     subtraction of non 64 bit counters
- * @mult:              cycle to nanosecond multiplier (adjusted by NTP)
- * @mult_orig:         cycle to nanosecond multiplier (unadjusted by NTP)
+ * @mult:              cycle to nanosecond multiplier
  * @shift:             cycle to nanosecond divisor (power of two)
+ * @max_idle_ns:       max idle time permitted by the clocksource (nsecs)
  * @flags:             flags describing special properties
  * @vread:             vsyscall based read
  * @resume:            resume function for the clocksource, if necessary
@@ -168,8 +168,8 @@ struct clocksource {
        void (*disable)(struct clocksource *cs);
        cycle_t mask;
        u32 mult;
-       u32 mult_orig;
        u32 shift;
+       u64 max_idle_ns;
        unsigned long flags;
        cycle_t (*vread)(void);
        void (*resume)(void);
@@ -279,12 +279,25 @@ extern struct clocksource* clocksource_get_next(void);
 extern void clocksource_change_rating(struct clocksource *cs, int rating);
 extern void clocksource_resume(void);
 extern struct clocksource * __init __weak clocksource_default_clock(void);
+extern void clocksource_mark_unstable(struct clocksource *cs);
+
+extern void
+clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec);
+
+static inline void
+clocksource_calc_mult_shift(struct clocksource *cs, u32 freq, u32 minsec)
+{
+       return clocks_calc_mult_shift(&cs->mult, &cs->shift, freq,
+                                     NSEC_PER_SEC, minsec);
+}
 
 #ifdef CONFIG_GENERIC_TIME_VSYSCALL
-extern void update_vsyscall(struct timespec *ts, struct clocksource *c);
+extern void
+update_vsyscall(struct timespec *ts, struct clocksource *c, u32 mult);
 extern void update_vsyscall_tz(void);
 #else
-static inline void update_vsyscall(struct timespec *ts, struct clocksource *c)
+static inline void
+update_vsyscall(struct timespec *ts, struct clocksource *c, u32 mult)
 {
 }
 
@@ -293,4 +306,6 @@ static inline void update_vsyscall_tz(void)
 }
 #endif
 
+extern void timekeeping_notify(struct clocksource *clock);
+
 #endif /* _LINUX_CLOCKSOURCE_H */