diff options
| author | Steve French <sfrench@us.ibm.com> | 2006-03-03 06:27:25 -0500 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2006-03-03 06:27:25 -0500 |
| commit | c6ee60b7c8bbc78e3b1776b2820a7e7f95f8996a (patch) | |
| tree | 99b48ef0f5217fddc0aa897d9e60d95ace7da6ff /arch/mips/kernel/time.c | |
| parent | 13298defe5323c7fdcac268f588d8d1090758fb8 (diff) | |
| parent | c499ec24c31edf270e777a868ffd0daddcfe7ebd (diff) | |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'arch/mips/kernel/time.c')
| -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 7050b4ffffcd..42c94c771afb 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
| @@ -163,7 +163,7 @@ void do_gettimeofday(struct timeval *tv) | |||
| 163 | unsigned long seq; | 163 | unsigned long seq; |
| 164 | unsigned long lost; | 164 | unsigned long lost; |
| 165 | unsigned long usec, sec; | 165 | unsigned long usec, sec; |
| 166 | unsigned long max_ntp_tick = tick_usec - tickadj; | 166 | unsigned long max_ntp_tick; |
| 167 | 167 | ||
| 168 | do { | 168 | do { |
| 169 | seq = read_seqbegin(&xtime_lock); | 169 | seq = read_seqbegin(&xtime_lock); |
| @@ -178,12 +178,13 @@ void do_gettimeofday(struct timeval *tv) | |||
| 178 | * Better to lose some accuracy than have time go backwards.. | 178 | * Better to lose some accuracy than have time go backwards.. |
| 179 | */ | 179 | */ |
| 180 | if (unlikely(time_adjust < 0)) { | 180 | if (unlikely(time_adjust < 0)) { |
| 181 | max_ntp_tick = (USEC_PER_SEC / HZ) - tickadj; | ||
| 181 | usec = min(usec, max_ntp_tick); | 182 | usec = min(usec, max_ntp_tick); |
| 182 | 183 | ||
| 183 | if (lost) | 184 | if (lost) |
| 184 | usec += lost * max_ntp_tick; | 185 | usec += lost * max_ntp_tick; |
| 185 | } else if (unlikely(lost)) | 186 | } else if (unlikely(lost)) |
| 186 | usec += lost * tick_usec; | 187 | usec += lost * (USEC_PER_SEC / HZ); |
| 187 | 188 | ||
| 188 | sec = xtime.tv_sec; | 189 | sec = xtime.tv_sec; |
| 189 | usec += (xtime.tv_nsec / 1000); | 190 | usec += (xtime.tv_nsec / 1000); |
