Merge branch 'master' of git://oak/home/sfr/kernels/iseries/work
[sfrench/cifs-2.6.git] / arch / m68k / kernel / time.c
index 4ec95e3cb8748721ec6b37880d0a87aaf1b55f83..6cfc984380d96619dc821d840a35825701cca28d 100644 (file)
 #include <linux/timex.h>
 #include <linux/profile.h>
 
-u64 jiffies_64 = INITIAL_JIFFIES;
-
-EXPORT_SYMBOL(jiffies_64);
-
 static inline int set_rtc_mmss(unsigned long nowtime)
 {
   if (mach_set_clock_mmss)
@@ -44,7 +40,7 @@ static inline int set_rtc_mmss(unsigned long nowtime)
  */
 static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs * regs)
 {
-       do_timer(regs);
+       do_timer(1);
 #ifndef CONFIG_SMP
        update_process_times(user_mode(regs));
 #endif
@@ -100,31 +96,23 @@ void time_init(void)
 void do_gettimeofday(struct timeval *tv)
 {
        unsigned long flags;
-       extern unsigned long wall_jiffies;
        unsigned long seq;
-       unsigned long usec, sec, lost;
+       unsigned long usec, sec;
        unsigned long max_ntp_tick = tick_usec - tickadj;
 
        do {
                seq = read_seqbegin_irqsave(&xtime_lock, flags);
 
                usec = mach_gettimeoffset();
-               lost = jiffies - wall_jiffies;
 
                /*
                 * If time_adjust is negative then NTP is slowing the clock
                 * so make sure not to go into next possible interval.
                 * Better to lose some accuracy than have time go backwards..
                 */
-               if (unlikely(time_adjust < 0)) {
+               if (unlikely(time_adjust < 0))
                        usec = min(usec, max_ntp_tick);
 
-                       if (lost)
-                               usec += lost * max_ntp_tick;
-               }
-               else if (unlikely(lost))
-                       usec += lost * tick_usec;
-
                sec = xtime.tv_sec;
                usec += xtime.tv_nsec/1000;
        } while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
@@ -145,7 +133,6 @@ int do_settimeofday(struct timespec *tv)
 {
        time_t wtm_sec, sec = tv->tv_sec;
        long wtm_nsec, nsec = tv->tv_nsec;
-       extern unsigned long wall_jiffies;
 
        if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
                return -EINVAL;
@@ -157,8 +144,7 @@ int do_settimeofday(struct timespec *tv)
         * Discover what correction gettimeofday
         * would have done, and then undo it!
         */
-       nsec -= 1000 * (mach_gettimeoffset() +
-                       (jiffies - wall_jiffies) * (1000000 / HZ));
+       nsec -= 1000 * mach_gettimeoffset();
 
        wtm_sec  = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
        wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);