Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[pandora-kernel.git] / arch / cris / arch-v10 / kernel / time.c
index 077e973..9310a7b 100644 (file)
@@ -1,5 +1,4 @@
-/* $Id: time.c,v 1.5 2004/09/29 06:12:46 starvik Exp $
- *
+/*
  *  linux/arch/cris/arch-v10/kernel/time.c
  *
  *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
 #include <linux/swap.h>
 #include <linux/sched.h>
 #include <linux/init.h>
+#include <linux/vmstat.h>
 #include <asm/arch/svinto.h>
 #include <asm/types.h>
 #include <asm/signal.h>
 #include <asm/io.h>
 #include <asm/delay.h>
 #include <asm/rtc.h>
+#include <asm/irq_regs.h>
 
 /* define this if you need to use print_timestamp */
 /* it will make jiffies at 96 hz instead of 100 hz though */
@@ -201,8 +202,9 @@ static long last_rtc_update = 0;
 extern void cris_do_profile(struct pt_regs *regs);
 
 static inline irqreturn_t
-timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+timer_interrupt(int irq, void *dev_id)
 {
+       struct pt_regs *regs = get_irq_regs();
        /* acknowledge the timer irq */
 
 #ifdef USE_CASCADE_TIMERS
@@ -221,9 +223,11 @@ timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 #endif
 
        /* reset watchdog otherwise it resets us! */
-
        reset_watchdog();
        
+       /* Update statistics. */
+       update_process_times(user_mode(regs));
+
        /* call the real timer interrupt handler */
 
        do_timer(1);
@@ -254,8 +258,12 @@ timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
  * it needs to be IRQF_DISABLED to make the jiffies update work properly
  */
 
-static struct irqaction irq2  = { timer_interrupt, IRQF_SHARED | IRQF_DISABLED,
-                                 CPU_MASK_NONE, "timer", NULL, NULL};
+static struct irqaction irq2  = {
+       .handler = timer_interrupt,
+       .flags = IRQF_SHARED | IRQF_DISABLED,
+       .mask = CPU_MASK_NONE,
+       .name = "timer",
+};
 
 void __init
 time_init(void)