X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=include%2Flinux%2Ftimex.h;h=da929dbbea2a1c9ab246ee134bb83dcd9ec5c935;hb=47455911674d65fba28d43f4135c28ee40c75bac;hp=049dfe4a11f2a520399314b50bf3664044b01c46;hpb=f0b364a13d7fba001c0571d954f165dfaf5f434a;p=powerpc.git diff --git a/include/linux/timex.h b/include/linux/timex.h index 049dfe4a11..da929dbbea 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h @@ -255,10 +255,10 @@ struct time_interpolator { u8 jitter; /* if set compensate for fluctuations */ u32 nsec_per_cyc; /* set by register_time_interpolator() */ void *addr; /* address of counter or function */ - u64 mask; /* mask the valid bits of the counter */ + cycles_t mask; /* mask the valid bits of the counter */ unsigned long offset; /* nsec offset at last update of interpolator */ u64 last_counter; /* counter value in units of the counter at last update */ - u64 last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */ + cycles_t last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */ u64 frequency; /* frequency in counts/second */ long drift; /* drift in parts-per-million (or -1) */ unsigned long skips; /* skips forward */ @@ -286,6 +286,13 @@ static inline void time_interpolator_update(long delta_nsec) #define TICK_LENGTH_SHIFT 32 +#ifdef CONFIG_NO_HZ +#define NTP_INTERVAL_FREQ (2) +#else +#define NTP_INTERVAL_FREQ (HZ) +#endif +#define NTP_INTERVAL_LENGTH (NSEC_PER_SEC/NTP_INTERVAL_FREQ) + /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ extern u64 current_tick_length(void); @@ -293,6 +300,9 @@ extern void second_overflow(void); extern void update_ntp_one_tick(void); extern int do_adjtimex(struct timex *); +/* Don't use! Compatibility define for existing users. */ +#define tickadj (500/HZ ? : 1) + #endif /* KERNEL */ #endif /* LINUX_TIMEX_H */