Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135751
b: refs/heads/master
c: 478b7aa
h: refs/heads/master
i:
  135749: 123b5da
  135747: 992528b
  135743: 1416787
v: v3
  • Loading branch information
Ingo Molnar committed Feb 25, 2009
1 parent d4bd81a commit 1793d98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f939890b6687e05c42361655fb6610fa08f5a601
refs/heads/master: 478b7aab1682246a3d1e76e27a0aecb2f0013379
11 changes: 5 additions & 6 deletions trunk/kernel/time/ntp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 1793d98

Please sign in to comment.