From 1793d983aa2370380595a6faae8224b2f05c57c2 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Sun, 22 Feb 2009 13:22:23 +0100 Subject: [PATCH] --- yaml --- r: 135751 b: refs/heads/master c: 478b7aab1682246a3d1e76e27a0aecb2f0013379 h: refs/heads/master i: 135749: 123b5da4dd9cd2725694183952ade8619537c75b 135747: 992528b21a219f0395fe4271e84d364c54a0f0d3 135743: 141678741ce6733a9a0ce3662993228357ddfcc9 v: v3 --- [refs] | 2 +- trunk/kernel/time/ntp.c | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 826a66f85799..a5949f36af75 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f939890b6687e05c42361655fb6610fa08f5a601 +refs/heads/master: 478b7aab1682246a3d1e76e27a0aecb2f0013379 diff --git a/trunk/kernel/time/ntp.c b/trunk/kernel/time/ntp.c index ee437e1445d1..5202dde2f0af 100644 --- a/trunk/kernel/time/ntp.c +++ b/trunk/kernel/time/ntp.c @@ -103,20 +103,19 @@ static void ntp_update_frequency(void) tick_length_base = new_base; } -static inline s64 ntp_update_offset_fll(s64 freq_adj, s64 offset64, long secs) +static inline s64 ntp_update_offset_fll(s64 offset64, long secs) { time_status &= ~STA_MODE; if (secs < MINSEC) - return freq_adj; + return 0; if (!(time_status & STA_FLL) && (secs <= MAXSEC)) - return freq_adj; + return 0; - freq_adj += div_s64(offset64 << (NTP_SCALE_SHIFT - SHIFT_FLL), secs); time_status |= STA_MODE; - return freq_adj; + return div_s64(offset64 << (NTP_SCALE_SHIFT - SHIFT_FLL), secs); } static void ntp_update_offset(long offset) @@ -152,7 +151,7 @@ static void ntp_update_offset(long offset) freq_adj = (offset64 * secs) << (NTP_SCALE_SHIFT - 2 * (SHIFT_PLL + 2 + time_constant)); - freq_adj = ntp_update_offset_fll(freq_adj, offset64, secs); + freq_adj += ntp_update_offset_fll(offset64, secs); freq_adj = min(freq_adj + time_freq, MAXFREQ_SCALED);