fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / v850 / kernel / time.c
index f722a26..cd06f47 100644 (file)
@@ -10,7 +10,6 @@
  *             "A Kernel Model for Precision Timekeeping" by Dave Mills
  */
 
-#include <linux/config.h> /* CONFIG_HEARTBEAT */
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 
 #include "mach.h"
 
-u64 jiffies_64 = INITIAL_JIFFIES;
-
-EXPORT_SYMBOL(jiffies_64);
-
 #define TICK_SIZE      (tick_nsec / 1000)
 
 /*
@@ -55,7 +50,7 @@ static irqreturn_t timer_interrupt (int irq, void *dummy, struct pt_regs *regs)
        if (mach_tick)
          mach_tick ();
 
-       do_timer (regs);
+       do_timer (1);
 #ifndef CONFIG_SMP
        update_process_times(user_mode(regs));
 #endif
@@ -66,7 +61,7 @@ static irqreturn_t timer_interrupt (int irq, void *dummy, struct pt_regs *regs)
         * 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) {
@@ -169,10 +164,7 @@ int do_settimeofday(struct timespec *tv)
        xtime.tv_sec = tv->tv_sec;
        xtime.tv_nsec = tv->tv_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();
@@ -184,7 +176,7 @@ EXPORT_SYMBOL(do_settimeofday);
 static int timer_dev_id;
 static struct irqaction timer_irqaction = {
        timer_interrupt,
-       SA_INTERRUPT,
+       IRQF_DISABLED,
        CPU_MASK_NONE,
        "timer",
        &timer_dev_id,