patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / arch / cris / arch-v10 / kernel / time.c
index 31e83a8..c4d78d5 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: time.c,v 1.2 2003/07/04 08:27:41 starvik Exp $
+/* $Id: time.c,v 1.3 2004/06/01 05:38:42 starvik Exp $
  *
  *  linux/arch/cris/arch-v10/kernel/time.c
  *
@@ -277,6 +277,12 @@ time_init(void)
                update_xtime_from_cmos();
        }
 
+       /*
+        * Initialize wall_to_monotonic such that adding it to xtime will yield zero, the
+        * tv_nsec field must be normalized (i.e., 0 <= nsec < NSEC_PER_SEC).
+        */
+       set_normalized_timespec(&wall_to_monotonic, -xtime.tv_sec, -xtime.tv_nsec);
+
        /* Setup the etrax timers
         * Base frequency is 25000 hz, divider 250 -> 100 HZ
         * In normal mode, we use timer0, so timer1 is free. In cascade