Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135756
b: refs/heads/master
c: 2b9d149
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Feb 25, 2009
1 parent bb33d7b commit 2271f71
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 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: e96291653b2e4df02f160b574070f6e632868e5e
refs/heads/master: 2b9d1496e7835a603c340e8f0dd81f4b74d5f248
2 changes: 1 addition & 1 deletion trunk/include/linux/timex.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ struct timex {
* offset and maximum frequency tolerance.
*/
#define SHIFT_USEC 16 /* frequency offset scale (shift) */
#define PPM_SCALE (NSEC_PER_USEC << (NTP_SCALE_SHIFT - SHIFT_USEC))
#define PPM_SCALE ((s64)NSEC_PER_USEC << (NTP_SCALE_SHIFT - SHIFT_USEC))
#define PPM_SCALE_INV_SHIFT 19
#define PPM_SCALE_INV ((1ll << (PPM_SCALE_INV_SHIFT + NTP_SCALE_SHIFT)) / \
PPM_SCALE + 1)
Expand Down
4 changes: 2 additions & 2 deletions trunk/kernel/time/ntp.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ static inline void process_adjtimex_modes(struct timex *txc, struct timespec *ts
time_status &= ~STA_NANO;

if (txc->modes & ADJ_FREQUENCY) {
time_freq = (s64)txc->freq * PPM_SCALE;
time_freq = txc->freq * PPM_SCALE;
time_freq = min(time_freq, MAXFREQ_SCALED);
time_freq = max(time_freq, -MAXFREQ_SCALED);
}
Expand Down Expand Up @@ -505,7 +505,7 @@ int do_adjtimex(struct timex *txc)
result = TIME_ERROR;

txc->freq = shift_right((time_freq >> PPM_SCALE_INV_SHIFT) *
(s64)PPM_SCALE_INV, NTP_SCALE_SHIFT);
PPM_SCALE_INV, NTP_SCALE_SHIFT);
txc->maxerror = time_maxerror;
txc->esterror = time_esterror;
txc->status = time_status;
Expand Down

0 comments on commit 2271f71

Please sign in to comment.