The patch titled ntp: add time_freq to tick length has been added to the -mm tree. Its filename is ntp-add-time_freq-to-tick-length.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: ntp: add time_freq to tick length From: Roman Zippel <zippel@xxxxxxxxxxxxxx> This adds the frequency part to ntp_update_frequency(). Signed-off-by: Roman Zippel <zippel@xxxxxxxxxxxxxx> Cc: john stultz <johnstul@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- kernel/time/ntp.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff -puN kernel/time/ntp.c~ntp-add-time_freq-to-tick-length kernel/time/ntp.c --- a/kernel/time/ntp.c~ntp-add-time_freq-to-tick-length +++ a/kernel/time/ntp.c @@ -43,8 +43,7 @@ long time_tolerance = MAXFREQ; /* frequ 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) */ -long time_freq = (((NSEC_PER_SEC + HZ/2) % HZ - HZ/2) << SHIFT_USEC) / NSEC_PER_USEC; - /* frequency offset (scaled ppm)*/ +long time_freq; /* frequency offset (scaled ppm)*/ long time_reftime; /* time at last adjustment (s) */ long time_adjust; long time_next_adjust; @@ -73,6 +72,7 @@ void ntp_update_frequency(void) { tick_length_base = (u64)(tick_usec * NSEC_PER_USEC * USER_HZ) << TICK_LENGTH_SHIFT; tick_length_base += (s64)CLOCK_TICK_ADJUST << TICK_LENGTH_SHIFT; + tick_length_base += ((s64)time_freq * NSEC_PER_USEC) << (TICK_LENGTH_SHIFT - SHIFT_USEC); do_div(tick_length_base, HZ); @@ -169,8 +169,6 @@ void second_overflow(void) * Compute the frequency estimate and additional phase adjustment due * to frequency error for the next second. */ - ltemp = time_freq; - time_adj += shift_right(ltemp,(SHIFT_USEC + SHIFT_HZ - SHIFT_SCALE)); #if HZ == 100 /* @@ -395,7 +393,7 @@ int do_adjtimex(struct timex *txc) if (txc->modes & ADJ_TICK) tick_usec = txc->tick; - if (txc->modes & ADJ_TICK) + if (txc->modes & (ADJ_TICK|ADJ_FREQUENCY|ADJ_OFFSET)) ntp_update_frequency(); } /* txc->modes */ leave: if ((time_status & (STA_UNSYNC|STA_CLOCKERR)) != 0) _ Patches currently in -mm which might be from zippel@xxxxxxxxxxxxxx are git-lxdialog.patch make-prot_write-imply-prot_read.patch ntp-move-all-the-ntp-related-code-to-ntpc.patch ntp-add-ntp_update_frequency.patch ntp-add-time_adj-to-tick-length.patch ntp-add-time_freq-to-tick-length.patch ntp-prescale-time_offset.patch ntp-add-time_adjust-to-tick-length.patch ntp-remove-time_tolerance.patch ntp-convert-time_freq-to-nsec-value.patch ntp-convert-to-the-ntp4-reference-model.patch ntp-cleanup-defines-and-comments.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html