Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/tick-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 26 Feb 2007 19:42:10 +0000 (11:42 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 26 Feb 2007 19:42:10 +0000 (11:42 -0800)
* master.kernel.org:/pub/scm/linux/kernel/git/davem/tick-2.6:
  [TICK] tick-common: Fix one-shot handling in tick_handle_periodic().
  [TIME] tick-sched: Add missing asm/irq_regs.h include.

kernel/time/tick-common.c
kernel/time/tick-sched.c

index 4500e347f1bb81e7bf9cbbce87713f6c2ff67592..0986a2bfab49e6a83a02660fa19c01479808b4d4 100644 (file)
@@ -77,6 +77,7 @@ static void tick_periodic(int cpu)
 void tick_handle_periodic(struct clock_event_device *dev)
 {
        int cpu = smp_processor_id();
+       ktime_t next;
 
        tick_periodic(cpu);
 
@@ -86,12 +87,12 @@ void tick_handle_periodic(struct clock_event_device *dev)
         * Setup the next period for devices, which do not have
         * periodic mode:
         */
+       next = ktime_add(dev->next_event, tick_period);
        for (;;) {
-               ktime_t next = ktime_add(dev->next_event, tick_period);
-
                if (!clockevents_program_event(dev, next, ktime_get()))
                        return;
                tick_periodic(cpu);
+               next = ktime_add(next, tick_period);
        }
 }
 
index 512a4a906467e1d0e5a08c00d7d3a83cbc8b69f0..51556b95f60f0db395cd7cdaf6a840479625fe1c 100644 (file)
@@ -21,6 +21,8 @@
 #include <linux/sched.h>
 #include <linux/tick.h>
 
+#include <asm/irq_regs.h>
+
 #include "tick-internal.h"
 
 /*