diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-03-03 22:22:45 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-03 22:22:45 -0500 |
commit | 46153552b43675dd4057cd526331b5bd10f39c7d (patch) | |
tree | 62b6055ee61e320dc10ea81903abbe2e7553bf4e /arch | |
parent | f90fdc3cce3d8c8ed09615dc68cb789655078803 (diff) | |
parent | f71e130966ba429dbd24be08ddbcdf263df9a5ad (diff) |
Merge branch 'net-const'
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/kernel/time.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 7050b4ffffc..42c94c771af 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c @@ -163,7 +163,7 @@ void do_gettimeofday(struct timeval *tv) unsigned long seq; unsigned long lost; unsigned long usec, sec; - unsigned long max_ntp_tick = tick_usec - tickadj; + unsigned long max_ntp_tick; do { seq = read_seqbegin(&xtime_lock); @@ -178,12 +178,13 @@ void do_gettimeofday(struct timeval *tv) * Better to lose some accuracy than have time go backwards.. */ if (unlikely(time_adjust < 0)) { + max_ntp_tick = (USEC_PER_SEC / HZ) - tickadj; usec = min(usec, max_ntp_tick); if (lost) usec += lost * max_ntp_tick; } else if (unlikely(lost)) - usec += lost * tick_usec; + usec += lost * (USEC_PER_SEC / HZ); sec = xtime.tv_sec; usec += (xtime.tv_nsec / 1000); |