aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/timex.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/timex.h')
-rw-r--r--include/linux/timex.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/timex.h b/include/linux/timex.h
index db501dc23c29..da929dbbea2a 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -255,10 +255,10 @@ struct time_interpolator {
255 u8 jitter; /* if set compensate for fluctuations */ 255 u8 jitter; /* if set compensate for fluctuations */
256 u32 nsec_per_cyc; /* set by register_time_interpolator() */ 256 u32 nsec_per_cyc; /* set by register_time_interpolator() */
257 void *addr; /* address of counter or function */ 257 void *addr; /* address of counter or function */
258 u64 mask; /* mask the valid bits of the counter */ 258 cycles_t mask; /* mask the valid bits of the counter */
259 unsigned long offset; /* nsec offset at last update of interpolator */ 259 unsigned long offset; /* nsec offset at last update of interpolator */
260 u64 last_counter; /* counter value in units of the counter at last update */ 260 u64 last_counter; /* counter value in units of the counter at last update */
261 u64 last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */ 261 cycles_t last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */
262 u64 frequency; /* frequency in counts/second */ 262 u64 frequency; /* frequency in counts/second */
263 long drift; /* drift in parts-per-million (or -1) */ 263 long drift; /* drift in parts-per-million (or -1) */
264 unsigned long skips; /* skips forward */ 264 unsigned long skips; /* skips forward */
@@ -286,6 +286,13 @@ static inline void time_interpolator_update(long delta_nsec)
286 286
287#define TICK_LENGTH_SHIFT 32 287#define TICK_LENGTH_SHIFT 32
288 288
289#ifdef CONFIG_NO_HZ
290#define NTP_INTERVAL_FREQ (2)
291#else
292#define NTP_INTERVAL_FREQ (HZ)
293#endif
294#define NTP_INTERVAL_LENGTH (NSEC_PER_SEC/NTP_INTERVAL_FREQ)
295
289/* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ 296/* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */
290extern u64 current_tick_length(void); 297extern u64 current_tick_length(void);
291 298