From 15917299b00cb7d4aa7b5d9ed20a0f9d7d82d5e6 Mon Sep 17 00:00:00 2001 From: Roman Zippel Date: Sat, 30 Sep 2006 23:28:26 -0700 Subject: [PATCH] --- yaml --- r: 37679 b: refs/heads/master c: 97eebe138caaf78354b1fad233e63bafdcc4fd54 h: refs/heads/master i: 37677: 6a088e16d4bf9ecc467c781f9cbd615e3e49d3f1 37675: e788beeebeddf9596ed32a02cdbfd48a52d563ee 37671: f53a131f94870e55622b4fe60331db68f069669a 37663: 8894c7bb3f52f34ce20ce5751f30a52c7d95927f v: v3 --- [refs] | 2 +- trunk/include/linux/timex.h | 1 - trunk/kernel/time/ntp.c | 9 ++++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 14628c35d58a..326b9ea095f2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8f807f8d2137ba728d22820103131038639b68a9 +refs/heads/master: 97eebe138caaf78354b1fad233e63bafdcc4fd54 diff --git a/trunk/include/linux/timex.h b/trunk/include/linux/timex.h index b5f297e17668..7715b4c0caf9 100644 --- a/trunk/include/linux/timex.h +++ b/trunk/include/linux/timex.h @@ -208,7 +208,6 @@ extern int time_state; /* clock status */ extern int time_status; /* clock synchronization status bits */ extern long time_offset; /* time adjustment (us) */ extern long time_constant; /* pll time constant */ -extern long time_tolerance; /* frequency tolerance (ppm) */ extern long time_precision; /* clock precision (us) */ extern long time_maxerror; /* maximum error */ extern long time_esterror; /* estimated error */ diff --git a/trunk/kernel/time/ntp.c b/trunk/kernel/time/ntp.c index 65223b7ed810..af7563f5d4e2 100644 --- a/trunk/kernel/time/ntp.c +++ b/trunk/kernel/time/ntp.c @@ -34,7 +34,6 @@ int time_state = TIME_OK; /* clock synchronization status */ int time_status = STA_UNSYNC; /* clock status bits */ long time_offset; /* time adjustment (ns) */ long time_constant = 2; /* pll time constant */ -long time_tolerance = MAXFREQ; /* frequency tolerance (ppm) */ long time_precision = 1; /* clock precision (us) */ long time_maxerror = NTP_PHASE_LIMIT; /* maximum error (us) */ long time_esterror = NTP_PHASE_LIMIT; /* estimated error (us) */ @@ -87,7 +86,7 @@ void second_overflow(void) long time_adj; /* Bump the maxerror field */ - time_maxerror += time_tolerance >> SHIFT_USEC; + time_maxerror += MAXFREQ >> SHIFT_USEC; if (time_maxerror > NTP_PHASE_LIMIT) { time_maxerror = NTP_PHASE_LIMIT; time_status |= STA_UNSYNC; @@ -313,8 +312,8 @@ int do_adjtimex(struct timex *txc) } else /* calibration interval too long (p. 12) */ result = TIME_ERROR; } - time_freq = min(time_freq, time_tolerance); - time_freq = max(time_freq, -time_tolerance); + time_freq = min(time_freq, MAXFREQ); + time_freq = max(time_freq, -MAXFREQ); time_offset = (time_offset * NSEC_PER_USEC / HZ) << SHIFT_UPDATE; } /* STA_PLL */ } /* txc->modes & ADJ_OFFSET */ @@ -337,7 +336,7 @@ leave: if ((time_status & (STA_UNSYNC|STA_CLOCKERR)) != 0) txc->status = time_status; txc->constant = time_constant; txc->precision = time_precision; - txc->tolerance = time_tolerance; + txc->tolerance = MAXFREQ; txc->tick = tick_usec; /* PPS is not implemented, so these are zero */