Go to the documentation of this file.
53 #ifndef _LINUX_TIMEX_H
54 #define _LINUX_TIMEX_H
58 #define ADJ_ADJTIME 0x8000
59 #define ADJ_OFFSET_SINGLESHOT 0x0001
60 #define ADJ_OFFSET_READONLY 0x2000
61 #include <linux/compiler.h>
62 #include <linux/types.h>
65 #include <asm/timex.h>
107 #define SHIFT_USEC 16
108 #define PPM_SCALE ((s64)NSEC_PER_USEC << (NTP_SCALE_SHIFT - SHIFT_USEC))
109 #define PPM_SCALE_INV_SHIFT 19
110 #define PPM_SCALE_INV ((1LL << (PPM_SCALE_INV_SHIFT + NTP_SCALE_SHIFT)) / \
113 #define MAXPHASE 500000000L
114 #define MAXFREQ 500000
115 #define MAXFREQ_SCALED ((s64)MAXFREQ << NTP_SCALE_SHIFT)
118 #define NTP_PHASE_LIMIT ((MAXPHASE / NSEC_PER_USEC) << 5)
132 #define shift_right(x, s) ({ \
133 __typeof__(x) __x = (x); \
134 __typeof__(s) __s = (s); \
135 __x < 0 ? -(-__x >> __s) : __x >> __s; \
138 #define NTP_SCALE_SHIFT 32
140 #define NTP_INTERVAL_FREQ (HZ)
141 #define NTP_INTERVAL_LENGTH (NSEC_PER_SEC/NTP_INTERVAL_FREQ)
153 #define PIT_TICK_RATE 1193182ul