blob: df9718bac8d01529b9bb6e57be951a64639ce297 [file] [log] [blame]
john stultz4c7ee8d2006-09-30 23:28:22 -07001/*
2 * linux/kernel/time/ntp.c
3 *
4 * NTP state machine interfaces and logic.
5 *
6 * This code was mainly moved from kernel/timer.c and kernel/time.c
7 * Please see those files for relevant copyright info and historical
8 * changelogs.
9 */
10
11#include <linux/mm.h>
12#include <linux/time.h>
Thomas Gleixner82644452007-07-21 04:37:37 -070013#include <linux/timer.h>
john stultz4c7ee8d2006-09-30 23:28:22 -070014#include <linux/timex.h>
Alexey Dobriyane8edc6e2007-05-21 01:22:52 +040015#include <linux/jiffies.h>
16#include <linux/hrtimer.h>
Alexey Dobriyanaa0ac362007-07-15 23:40:39 -070017#include <linux/capability.h>
Roman Zippel71abb3a2008-05-01 04:34:26 -070018#include <linux/math64.h>
john stultz4c7ee8d2006-09-30 23:28:22 -070019#include <asm/timex.h>
20
Roman Zippelb0ee7552006-09-30 23:28:22 -070021/*
22 * Timekeeping variables
23 */
24unsigned long tick_usec = TICK_USEC; /* USER_HZ period (usec) */
25unsigned long tick_nsec; /* ACTHZ period (nsec) */
Roman Zippel8383c422008-05-01 04:34:39 -070026u64 tick_length;
27static u64 tick_length_base;
Roman Zippelb0ee7552006-09-30 23:28:22 -070028
Roman Zippel8f807f82006-09-30 23:28:25 -070029#define MAX_TICKADJ 500 /* microsecs */
30#define MAX_TICKADJ_SCALED (((u64)(MAX_TICKADJ * NSEC_PER_USEC) << \
Roman Zippel7fc5c782008-05-01 04:34:38 -070031 NTP_SCALE_SHIFT) / NTP_INTERVAL_FREQ)
john stultz4c7ee8d2006-09-30 23:28:22 -070032
33/*
34 * phase-lock loop variables
35 */
36/* TIME_ERROR prevents overwriting the CMOS clock */
Adrian Bunk70bc42f2006-09-30 23:28:29 -070037static int time_state = TIME_OK; /* clock synchronization status */
john stultz4c7ee8d2006-09-30 23:28:22 -070038int time_status = STA_UNSYNC; /* clock status bits */
Roman Zippel153b5d02008-05-01 04:34:37 -070039static long time_tai; /* TAI offset (s) */
Roman Zippelee9851b2008-05-01 04:34:32 -070040static s64 time_offset; /* time adjustment (ns) */
Adrian Bunk70bc42f2006-09-30 23:28:29 -070041static long time_constant = 2; /* pll time constant */
john stultz4c7ee8d2006-09-30 23:28:22 -070042long time_maxerror = NTP_PHASE_LIMIT; /* maximum error (us) */
43long time_esterror = NTP_PHASE_LIMIT; /* estimated error (us) */
Roman Zippel074b3b82008-05-01 04:34:34 -070044static s64 time_freq; /* frequency offset (scaled ns/s)*/
Adrian Bunk70bc42f2006-09-30 23:28:29 -070045static long time_reftime; /* time at last adjustment (s) */
john stultz4c7ee8d2006-09-30 23:28:22 -070046long time_adjust;
Roman Zippel10a398d2008-03-04 15:14:26 -080047static long ntp_tick_adj;
john stultz4c7ee8d2006-09-30 23:28:22 -070048
Adrian Bunk70bc42f2006-09-30 23:28:29 -070049static void ntp_update_frequency(void)
50{
john stultzf4304ab2007-02-16 01:27:26 -080051 u64 second_length = (u64)(tick_usec * NSEC_PER_USEC * USER_HZ)
Roman Zippel7fc5c782008-05-01 04:34:38 -070052 << NTP_SCALE_SHIFT;
53 second_length += (s64)ntp_tick_adj << NTP_SCALE_SHIFT;
Roman Zippel074b3b82008-05-01 04:34:34 -070054 second_length += time_freq;
Adrian Bunk70bc42f2006-09-30 23:28:29 -070055
john stultzf4304ab2007-02-16 01:27:26 -080056 tick_length_base = second_length;
Adrian Bunk70bc42f2006-09-30 23:28:29 -070057
Roman Zippel7fc5c782008-05-01 04:34:38 -070058 tick_nsec = div_u64(second_length, HZ) >> NTP_SCALE_SHIFT;
Roman Zippel71abb3a2008-05-01 04:34:26 -070059 tick_length_base = div_u64(tick_length_base, NTP_INTERVAL_FREQ);
Adrian Bunk70bc42f2006-09-30 23:28:29 -070060}
61
Roman Zippelee9851b2008-05-01 04:34:32 -070062static void ntp_update_offset(long offset)
63{
64 long mtemp;
65 s64 freq_adj;
66
67 if (!(time_status & STA_PLL))
68 return;
69
Roman Zippeleea83d82008-05-01 04:34:33 -070070 if (!(time_status & STA_NANO))
Roman Zippel9f14f662008-05-01 04:34:36 -070071 offset *= NSEC_PER_USEC;
Roman Zippelee9851b2008-05-01 04:34:32 -070072
73 /*
74 * Scale the phase adjustment and
75 * clamp to the operating range.
76 */
Roman Zippel9f14f662008-05-01 04:34:36 -070077 offset = min(offset, MAXPHASE);
78 offset = max(offset, -MAXPHASE);
Roman Zippelee9851b2008-05-01 04:34:32 -070079
80 /*
81 * Select how the frequency is to be controlled
82 * and in which mode (PLL or FLL).
83 */
84 if (time_status & STA_FREQHOLD || time_reftime == 0)
85 time_reftime = xtime.tv_sec;
86 mtemp = xtime.tv_sec - time_reftime;
87 time_reftime = xtime.tv_sec;
88
Roman Zippel9f14f662008-05-01 04:34:36 -070089 freq_adj = (s64)offset * mtemp;
Roman Zippel7fc5c782008-05-01 04:34:38 -070090 freq_adj <<= NTP_SCALE_SHIFT - 2 * (SHIFT_PLL + 2 + time_constant);
Roman Zippeleea83d82008-05-01 04:34:33 -070091 time_status &= ~STA_MODE;
92 if (mtemp >= MINSEC && (time_status & STA_FLL || mtemp > MAXSEC)) {
Roman Zippel7fc5c782008-05-01 04:34:38 -070093 freq_adj += div_s64((s64)offset << (NTP_SCALE_SHIFT - SHIFT_FLL),
Roman Zippel074b3b82008-05-01 04:34:34 -070094 mtemp);
Roman Zippeleea83d82008-05-01 04:34:33 -070095 time_status |= STA_MODE;
96 }
Roman Zippelee9851b2008-05-01 04:34:32 -070097 freq_adj += time_freq;
Roman Zippel074b3b82008-05-01 04:34:34 -070098 freq_adj = min(freq_adj, MAXFREQ_SCALED);
99 time_freq = max(freq_adj, -MAXFREQ_SCALED);
Roman Zippel9f14f662008-05-01 04:34:36 -0700100
Roman Zippel7fc5c782008-05-01 04:34:38 -0700101 time_offset = div_s64((s64)offset << NTP_SCALE_SHIFT, NTP_INTERVAL_FREQ);
Roman Zippelee9851b2008-05-01 04:34:32 -0700102}
103
Roman Zippelb0ee7552006-09-30 23:28:22 -0700104/**
105 * ntp_clear - Clears the NTP state variables
106 *
107 * Must be called while holding a write on the xtime_lock
108 */
109void ntp_clear(void)
110{
111 time_adjust = 0; /* stop active adjtime() */
112 time_status |= STA_UNSYNC;
113 time_maxerror = NTP_PHASE_LIMIT;
114 time_esterror = NTP_PHASE_LIMIT;
115
116 ntp_update_frequency();
117
118 tick_length = tick_length_base;
Roman Zippel3d3675c2006-09-30 23:28:25 -0700119 time_offset = 0;
Roman Zippelb0ee7552006-09-30 23:28:22 -0700120}
121
john stultz4c7ee8d2006-09-30 23:28:22 -0700122/*
123 * this routine handles the overflow of the microsecond field
124 *
125 * The tricky bits of code to handle the accurate clock support
126 * were provided by Dave Mills (Mills@UDEL.EDU) of NTP fame.
127 * They were originally developed for SUN and DEC kernels.
128 * All the kudos should go to Dave for this stuff.
129 */
130void second_overflow(void)
131{
Roman Zippel9f14f662008-05-01 04:34:36 -0700132 s64 time_adj;
john stultz4c7ee8d2006-09-30 23:28:22 -0700133
134 /* Bump the maxerror field */
Roman Zippel074b3b82008-05-01 04:34:34 -0700135 time_maxerror += MAXFREQ / NSEC_PER_USEC;
john stultz4c7ee8d2006-09-30 23:28:22 -0700136 if (time_maxerror > NTP_PHASE_LIMIT) {
137 time_maxerror = NTP_PHASE_LIMIT;
138 time_status |= STA_UNSYNC;
139 }
140
141 /*
142 * Leap second processing. If in leap-insert state at the end of the
143 * day, the system clock is set back one second; if in leap-delete
144 * state, the system clock is set ahead one second. The microtime()
145 * routine or external clock driver will insure that reported time is
146 * always monotonic. The ugly divides should be replaced.
147 */
148 switch (time_state) {
149 case TIME_OK:
150 if (time_status & STA_INS)
151 time_state = TIME_INS;
152 else if (time_status & STA_DEL)
153 time_state = TIME_DEL;
154 break;
155 case TIME_INS:
156 if (xtime.tv_sec % 86400 == 0) {
157 xtime.tv_sec--;
158 wall_to_monotonic.tv_sec++;
john stultz4c7ee8d2006-09-30 23:28:22 -0700159 time_state = TIME_OOP;
john stultz4c7ee8d2006-09-30 23:28:22 -0700160 printk(KERN_NOTICE "Clock: inserting leap second "
161 "23:59:60 UTC\n");
162 }
163 break;
164 case TIME_DEL:
165 if ((xtime.tv_sec + 1) % 86400 == 0) {
166 xtime.tv_sec++;
Roman Zippel153b5d02008-05-01 04:34:37 -0700167 time_tai--;
john stultz4c7ee8d2006-09-30 23:28:22 -0700168 wall_to_monotonic.tv_sec--;
john stultz4c7ee8d2006-09-30 23:28:22 -0700169 time_state = TIME_WAIT;
john stultz4c7ee8d2006-09-30 23:28:22 -0700170 printk(KERN_NOTICE "Clock: deleting leap second "
171 "23:59:59 UTC\n");
172 }
173 break;
174 case TIME_OOP:
Roman Zippel153b5d02008-05-01 04:34:37 -0700175 time_tai++;
john stultz4c7ee8d2006-09-30 23:28:22 -0700176 time_state = TIME_WAIT;
177 break;
178 case TIME_WAIT:
179 if (!(time_status & (STA_INS | STA_DEL)))
Roman Zippelee9851b2008-05-01 04:34:32 -0700180 time_state = TIME_OK;
john stultz4c7ee8d2006-09-30 23:28:22 -0700181 }
182
183 /*
Roman Zippelf1992392006-09-30 23:28:28 -0700184 * Compute the phase adjustment for the next second. The offset is
185 * reduced by a fixed factor times the time constant.
john stultz4c7ee8d2006-09-30 23:28:22 -0700186 */
Roman Zippelb0ee7552006-09-30 23:28:22 -0700187 tick_length = tick_length_base;
Roman Zippelf1992392006-09-30 23:28:28 -0700188 time_adj = shift_right(time_offset, SHIFT_PLL + time_constant);
Roman Zippel3d3675c2006-09-30 23:28:25 -0700189 time_offset -= time_adj;
Roman Zippel9f14f662008-05-01 04:34:36 -0700190 tick_length += time_adj;
john stultz4c7ee8d2006-09-30 23:28:22 -0700191
Roman Zippel8f807f82006-09-30 23:28:25 -0700192 if (unlikely(time_adjust)) {
193 if (time_adjust > MAX_TICKADJ) {
194 time_adjust -= MAX_TICKADJ;
195 tick_length += MAX_TICKADJ_SCALED;
196 } else if (time_adjust < -MAX_TICKADJ) {
197 time_adjust += MAX_TICKADJ;
198 tick_length -= MAX_TICKADJ_SCALED;
199 } else {
Roman Zippel8f807f82006-09-30 23:28:25 -0700200 tick_length += (s64)(time_adjust * NSEC_PER_USEC /
Roman Zippel7fc5c782008-05-01 04:34:38 -0700201 NTP_INTERVAL_FREQ) << NTP_SCALE_SHIFT;
Jim Houstonbb1d8602006-10-28 10:38:56 -0700202 time_adjust = 0;
Roman Zippel8f807f82006-09-30 23:28:25 -0700203 }
john stultz4c7ee8d2006-09-30 23:28:22 -0700204 }
205}
206
Thomas Gleixner82644452007-07-21 04:37:37 -0700207#ifdef CONFIG_GENERIC_CMOS_UPDATE
john stultz4c7ee8d2006-09-30 23:28:22 -0700208
Thomas Gleixner82644452007-07-21 04:37:37 -0700209/* Disable the cmos update - used by virtualization and embedded */
210int no_sync_cmos_clock __read_mostly;
211
212static void sync_cmos_clock(unsigned long dummy);
213
214static DEFINE_TIMER(sync_cmos_timer, sync_cmos_clock, 0, 0);
215
216static void sync_cmos_clock(unsigned long dummy)
john stultz4c7ee8d2006-09-30 23:28:22 -0700217{
Thomas Gleixner82644452007-07-21 04:37:37 -0700218 struct timespec now, next;
219 int fail = 1;
220
221 /*
222 * If we have an externally synchronized Linux clock, then update
223 * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be
224 * called as close as possible to 500 ms before the new second starts.
225 * This code is run on a timer. If the clock is set, that timer
226 * may not expire at the correct time. Thus, we adjust...
227 */
228 if (!ntp_synced())
229 /*
230 * Not synced, exit, do not restart a timer (if one is
231 * running, let it run out).
232 */
233 return;
234
235 getnstimeofday(&now);
David P. Reedfa6a1a52007-11-14 17:49:21 -0500236 if (abs(now.tv_nsec - (NSEC_PER_SEC / 2)) <= tick_nsec / 2)
Thomas Gleixner82644452007-07-21 04:37:37 -0700237 fail = update_persistent_clock(now);
238
239 next.tv_nsec = (NSEC_PER_SEC / 2) - now.tv_nsec;
240 if (next.tv_nsec <= 0)
241 next.tv_nsec += NSEC_PER_SEC;
242
243 if (!fail)
244 next.tv_sec = 659;
245 else
246 next.tv_sec = 0;
247
248 if (next.tv_nsec >= NSEC_PER_SEC) {
249 next.tv_sec++;
250 next.tv_nsec -= NSEC_PER_SEC;
251 }
252 mod_timer(&sync_cmos_timer, jiffies + timespec_to_jiffies(&next));
john stultz4c7ee8d2006-09-30 23:28:22 -0700253}
254
Thomas Gleixner82644452007-07-21 04:37:37 -0700255static void notify_cmos_timer(void)
256{
Tony Breeds298a5df2007-09-11 15:24:03 -0700257 if (!no_sync_cmos_clock)
Thomas Gleixner82644452007-07-21 04:37:37 -0700258 mod_timer(&sync_cmos_timer, jiffies + 1);
259}
260
261#else
262static inline void notify_cmos_timer(void) { }
263#endif
264
john stultz4c7ee8d2006-09-30 23:28:22 -0700265/* adjtimex mainly allows reading (and writing, if superuser) of
266 * kernel time-keeping variables. used by xntpd.
267 */
268int do_adjtimex(struct timex *txc)
269{
Roman Zippeleea83d82008-05-01 04:34:33 -0700270 struct timespec ts;
Roman Zippelee9851b2008-05-01 04:34:32 -0700271 long save_adjust;
john stultz4c7ee8d2006-09-30 23:28:22 -0700272 int result;
273
274 /* In order to modify anything, you gotta be super-user! */
275 if (txc->modes && !capable(CAP_SYS_TIME))
276 return -EPERM;
277
278 /* Now we validate the data before disabling interrupts */
279
John Stultz52bfb362007-11-26 20:42:19 +0100280 if ((txc->modes & ADJ_OFFSET_SINGLESHOT) == ADJ_OFFSET_SINGLESHOT) {
Roman Zippeleea83d82008-05-01 04:34:33 -0700281 /* singleshot must not be used with any other mode bits */
282 if (txc->modes & ~ADJ_OFFSET_SS_READ)
john stultz4c7ee8d2006-09-30 23:28:22 -0700283 return -EINVAL;
John Stultz52bfb362007-11-26 20:42:19 +0100284 }
john stultz4c7ee8d2006-09-30 23:28:22 -0700285
john stultz4c7ee8d2006-09-30 23:28:22 -0700286 /* if the quartz is off by more than 10% something is VERY wrong ! */
287 if (txc->modes & ADJ_TICK)
288 if (txc->tick < 900000/USER_HZ ||
289 txc->tick > 1100000/USER_HZ)
290 return -EINVAL;
291
292 write_seqlock_irq(&xtime_lock);
john stultz4c7ee8d2006-09-30 23:28:22 -0700293
294 /* Save for later - semantics of adjtime is to return old value */
Roman Zippel8f807f82006-09-30 23:28:25 -0700295 save_adjust = time_adjust;
john stultz4c7ee8d2006-09-30 23:28:22 -0700296
john stultz4c7ee8d2006-09-30 23:28:22 -0700297 /* If there are input parameters, then process them */
Roman Zippelee9851b2008-05-01 04:34:32 -0700298 if (txc->modes) {
Roman Zippeleea83d82008-05-01 04:34:33 -0700299 if (txc->modes & ADJ_STATUS) {
300 if ((time_status & STA_PLL) &&
301 !(txc->status & STA_PLL)) {
302 time_state = TIME_OK;
303 time_status = STA_UNSYNC;
304 }
305 /* only set allowed bits */
306 time_status &= STA_RONLY;
307 time_status |= txc->status & ~STA_RONLY;
308 }
309
310 if (txc->modes & ADJ_NANO)
311 time_status |= STA_NANO;
312 if (txc->modes & ADJ_MICRO)
313 time_status &= ~STA_NANO;
john stultz4c7ee8d2006-09-30 23:28:22 -0700314
Roman Zippelee9851b2008-05-01 04:34:32 -0700315 if (txc->modes & ADJ_FREQUENCY) {
Roman Zippel074b3b82008-05-01 04:34:34 -0700316 time_freq = (s64)txc->freq * PPM_SCALE;
317 time_freq = min(time_freq, MAXFREQ_SCALED);
318 time_freq = max(time_freq, -MAXFREQ_SCALED);
john stultz4c7ee8d2006-09-30 23:28:22 -0700319 }
john stultz4c7ee8d2006-09-30 23:28:22 -0700320
Roman Zippeleea83d82008-05-01 04:34:33 -0700321 if (txc->modes & ADJ_MAXERROR)
Roman Zippelee9851b2008-05-01 04:34:32 -0700322 time_maxerror = txc->maxerror;
Roman Zippeleea83d82008-05-01 04:34:33 -0700323 if (txc->modes & ADJ_ESTERROR)
Roman Zippelee9851b2008-05-01 04:34:32 -0700324 time_esterror = txc->esterror;
john stultz4c7ee8d2006-09-30 23:28:22 -0700325
Roman Zippelee9851b2008-05-01 04:34:32 -0700326 if (txc->modes & ADJ_TIMECONST) {
Roman Zippeleea83d82008-05-01 04:34:33 -0700327 time_constant = txc->constant;
328 if (!(time_status & STA_NANO))
329 time_constant += 4;
330 time_constant = min(time_constant, (long)MAXTC);
331 time_constant = max(time_constant, 0l);
john stultz4c7ee8d2006-09-30 23:28:22 -0700332 }
john stultz4c7ee8d2006-09-30 23:28:22 -0700333
Roman Zippel153b5d02008-05-01 04:34:37 -0700334 if (txc->modes & ADJ_TAI && txc->constant > 0)
335 time_tai = txc->constant;
336
Roman Zippelee9851b2008-05-01 04:34:32 -0700337 if (txc->modes & ADJ_OFFSET) {
338 if (txc->modes == ADJ_OFFSET_SINGLESHOT)
339 /* adjtime() is independent from ntp_adjtime() */
340 time_adjust = txc->offset;
341 else
342 ntp_update_offset(txc->offset);
john stultz4c7ee8d2006-09-30 23:28:22 -0700343 }
Roman Zippelee9851b2008-05-01 04:34:32 -0700344 if (txc->modes & ADJ_TICK)
345 tick_usec = txc->tick;
john stultz4c7ee8d2006-09-30 23:28:22 -0700346
Roman Zippelee9851b2008-05-01 04:34:32 -0700347 if (txc->modes & (ADJ_TICK|ADJ_FREQUENCY|ADJ_OFFSET))
348 ntp_update_frequency();
349 }
Roman Zippeleea83d82008-05-01 04:34:33 -0700350
351 result = time_state; /* mostly `TIME_OK' */
Roman Zippelee9851b2008-05-01 04:34:32 -0700352 if (time_status & (STA_UNSYNC|STA_CLOCKERR))
john stultz4c7ee8d2006-09-30 23:28:22 -0700353 result = TIME_ERROR;
354
John Stultz52bfb362007-11-26 20:42:19 +0100355 if ((txc->modes == ADJ_OFFSET_SINGLESHOT) ||
Roman Zippelee9851b2008-05-01 04:34:32 -0700356 (txc->modes == ADJ_OFFSET_SS_READ))
john stultzd62ac212007-03-26 21:32:26 -0800357 txc->offset = save_adjust;
Roman Zippeleea83d82008-05-01 04:34:33 -0700358 else {
Roman Zippel9f14f662008-05-01 04:34:36 -0700359 txc->offset = shift_right(time_offset * NTP_INTERVAL_FREQ,
Roman Zippel7fc5c782008-05-01 04:34:38 -0700360 NTP_SCALE_SHIFT);
Roman Zippeleea83d82008-05-01 04:34:33 -0700361 if (!(time_status & STA_NANO))
362 txc->offset /= NSEC_PER_USEC;
363 }
Roman Zippel074b3b82008-05-01 04:34:34 -0700364 txc->freq = shift_right((s32)(time_freq >> PPM_SCALE_INV_SHIFT) *
365 (s64)PPM_SCALE_INV,
Roman Zippel7fc5c782008-05-01 04:34:38 -0700366 NTP_SCALE_SHIFT);
john stultz4c7ee8d2006-09-30 23:28:22 -0700367 txc->maxerror = time_maxerror;
368 txc->esterror = time_esterror;
369 txc->status = time_status;
370 txc->constant = time_constant;
Adrian Bunk70bc42f2006-09-30 23:28:29 -0700371 txc->precision = 1;
Roman Zippel074b3b82008-05-01 04:34:34 -0700372 txc->tolerance = MAXFREQ_SCALED / PPM_SCALE;
john stultz4c7ee8d2006-09-30 23:28:22 -0700373 txc->tick = tick_usec;
Roman Zippel153b5d02008-05-01 04:34:37 -0700374 txc->tai = time_tai;
john stultz4c7ee8d2006-09-30 23:28:22 -0700375
376 /* PPS is not implemented, so these are zero */
377 txc->ppsfreq = 0;
378 txc->jitter = 0;
379 txc->shift = 0;
380 txc->stabil = 0;
381 txc->jitcnt = 0;
382 txc->calcnt = 0;
383 txc->errcnt = 0;
384 txc->stbcnt = 0;
385 write_sequnlock_irq(&xtime_lock);
Roman Zippelee9851b2008-05-01 04:34:32 -0700386
Roman Zippeleea83d82008-05-01 04:34:33 -0700387 getnstimeofday(&ts);
388 txc->time.tv_sec = ts.tv_sec;
389 txc->time.tv_usec = ts.tv_nsec;
390 if (!(time_status & STA_NANO))
391 txc->time.tv_usec /= NSEC_PER_USEC;
Roman Zippelee9851b2008-05-01 04:34:32 -0700392
Thomas Gleixner82644452007-07-21 04:37:37 -0700393 notify_cmos_timer();
Roman Zippelee9851b2008-05-01 04:34:32 -0700394
395 return result;
john stultz4c7ee8d2006-09-30 23:28:22 -0700396}
Roman Zippel10a398d2008-03-04 15:14:26 -0800397
398static int __init ntp_tick_adj_setup(char *str)
399{
400 ntp_tick_adj = simple_strtol(str, NULL, 0);
401 return 1;
402}
403
404__setup("ntp_tick_adj=", ntp_tick_adj_setup);