]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/alpha/kernel/time.c
m68knommu: MCF5307 PIT GENERIC_CLOCKEVENTS support
[linux-2.6-omap-h63xx.git] / arch / alpha / kernel / time.c
index d7053eb4ffcfd93623d58aabda82d30cf9118dee..75480cab0893c391619e681bdc1ee6dd6adbf7ed 100644 (file)
@@ -90,17 +90,6 @@ static inline __u32 rpcc(void)
     return result;
 }
 
-/*
- * Scheduler clock - returns current time in nanosec units.
- *
- * Copied from ARM code for expediency... ;-}
- */
-unsigned long long sched_clock(void)
-{
-        return (unsigned long long)jiffies * (1000000000 / HZ);
-}
-
-
 /*
  * timer_interrupt() needs to keep up the real-time clock,
  * as well as call the "do_timer()" routine every clocktick
@@ -130,13 +119,8 @@ irqreturn_t timer_interrupt(int irq, void *dev)
        state.partial_tick = delta & ((1UL << FIX_SHIFT) - 1); 
        nticks = delta >> FIX_SHIFT;
 
-       while (nticks > 0) {
-               do_timer(1);
-#ifndef CONFIG_SMP
-               update_process_times(user_mode(get_irq_regs()));
-#endif
-               nticks--;
-       }
+       if (nticks)
+               do_timer(nticks);
 
        /*
         * If we have an externally synchronized Linux clock, then update
@@ -152,10 +136,16 @@ irqreturn_t timer_interrupt(int irq, void *dev)
        }
 
        write_sequnlock(&xtime_lock);
+
+#ifndef CONFIG_SMP
+       while (nticks--)
+               update_process_times(user_mode(get_irq_regs()));
+#endif
+
        return IRQ_HANDLED;
 }
 
-void
+void __init
 common_init_rtc(void)
 {
        unsigned char x;