linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / arch / parisc / kernel / time.c
index 5facc9b..594930b 100644 (file)
@@ -10,6 +10,7 @@
  * 1998-12-20  Updated NTP code according to technical memorandum Jan '96
  *             "A Kernel Model for Precision Timekeeping" by Dave Mills
  */
+#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/module.h>
 #include <linux/sched.h>
@@ -156,22 +157,8 @@ do_gettimeofday (struct timeval *tv)
                usec += (xtime.tv_nsec / 1000);
        } while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
 
-       if (unlikely(usec > LONG_MAX)) {
-               /* This can happen if the gettimeoffset adjustment is
-                * negative and xtime.tv_nsec is smaller than the
-                * adjustment */
-               printk(KERN_ERR "do_gettimeofday() spurious xtime.tv_nsec of %ld\n", usec);
-               usec += USEC_PER_SEC;
-               --sec;
-               /* This should never happen, it means the negative
-                * time adjustment was more than a second, so there's
-                * something seriously wrong */
-               BUG_ON(usec > LONG_MAX);
-       }
-
-
-       while (usec >= USEC_PER_SEC) {
-               usec -= USEC_PER_SEC;
+       while (usec >= 1000000) {
+               usec -= 1000000;
                ++sec;
        }