Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37675
b: refs/heads/master
c: ab8783b
h: refs/heads/master
i:
  37673: d0aa3d6
  37671: f53a131
v: v3
  • Loading branch information
Roman Zippel authored and Linus Torvalds committed Oct 1, 2006
1 parent 07f4647 commit e788bee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 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: b0ee75561beadc4db4d9a899c8ef4a7db50aa0ab
refs/heads/master: ab8783b688f33c40ed7b37b814a4a1e7d341ce11
6 changes: 2 additions & 4 deletions trunk/kernel/time/ntp.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ 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)*/
static long time_adj; /* tick adjust (scaled 1 / HZ) */
long time_reftime; /* time at last adjustment (s) */
long time_adjust;
long time_next_adjust;
Expand Down Expand Up @@ -84,7 +83,7 @@ void ntp_update_frequency(void)
*/
void second_overflow(void)
{
long ltemp;
long ltemp, time_adj;

/* Bump the maxerror field */
time_maxerror += time_tolerance >> SHIFT_USEC;
Expand Down Expand Up @@ -189,6 +188,7 @@ void second_overflow(void)
time_adj += shift_right(time_adj, 6) + shift_right(time_adj, 7);
#endif
tick_length = tick_length_base;
tick_length += (s64)time_adj << (TICK_LENGTH_SHIFT - (SHIFT_SCALE - 10));
}

/*
Expand Down Expand Up @@ -245,11 +245,9 @@ u64 current_tick_length(void)
u64 ret;

/* calculate the finest interval NTP will allow.
* ie: nanosecond value shifted by (SHIFT_SCALE - 10)
*/
ret = tick_length;
ret += (u64)(adjtime_adjustment() * 1000) << TICK_LENGTH_SHIFT;
ret += (s64)time_adj << (TICK_LENGTH_SHIFT - (SHIFT_SCALE - 10));

return ret;
}
Expand Down

0 comments on commit e788bee

Please sign in to comment.