fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / m68knommu / kernel / time.c
index e328f28..9226264 100644 (file)
@@ -10,7 +10,6 @@
  *             "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>
 
 #define        TICK_SIZE (tick_nsec / 1000)
 
-u64 jiffies_64 = INITIAL_JIFFIES;
-
-EXPORT_SYMBOL(jiffies_64);
-
-extern unsigned long wall_jiffies;
-
 
 static inline int set_rtc_mmss(unsigned long nowtime)
 {
@@ -56,16 +49,19 @@ static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs * regs)
 
        write_seqlock(&xtime_lock);
 
-       do_timer(regs);
+       do_timer(1);
+#ifndef CONFIG_SMP
+       update_process_times(user_mode(regs));
+#endif
        if (current->pid)
-               profile_tick(CPU_PROFILING, regs);
+               profile_tick(CPU_PROFILING);
 
        /*
         * If we have an externally synchronized Linux clock, then update
         * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be
         * called as close as possible to 500 ms before the new second starts.
         */
-       if ((time_status & STA_UNSYNC) == 0 &&
+       if (ntp_synced() &&
            xtime.tv_sec > last_rtc_update + 660 &&
            (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 &&
            (xtime.tv_nsec  / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2) {
@@ -126,15 +122,12 @@ void time_init(void)
 void do_gettimeofday(struct timeval *tv)
 {
        unsigned long flags;
-       unsigned long lost, seq;
+       unsigned long seq;
        unsigned long usec, sec;
 
        do {
                seq = read_seqbegin_irqsave(&xtime_lock, flags);
                usec = mach_gettimeoffset ? mach_gettimeoffset() : 0;
-               lost = jiffies - wall_jiffies;
-               if (lost)
-                       usec += lost * (1000000 / HZ);
                sec = xtime.tv_sec;
                usec += (xtime.tv_nsec / 1000);
        } while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
@@ -175,10 +168,7 @@ int do_settimeofday(struct timespec *tv)
        set_normalized_timespec(&xtime, sec, nsec);
        set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
 
-       time_adjust = 0;                /* stop active adjtime() */
-       time_status |= STA_UNSYNC;
-       time_maxerror = NTP_PHASE_LIMIT;
-       time_esterror = NTP_PHASE_LIMIT;
+       ntp_clear();
        write_sequnlock_irq(&xtime_lock);
        clock_was_set();
        return 0;