]> err.no Git - linux-2.6/blobdiff - kernel/time/clocksource.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[linux-2.6] / kernel / time / clocksource.c
index 81afb3927eccca2a8f684eb41508740779ed102a..73961f35fdc84ba1ba28251bb4115f52b094d908 100644 (file)
@@ -91,7 +91,6 @@ static void clocksource_ratewd(struct clocksource *cs, int64_t delta)
               cs->name, delta);
        cs->flags &= ~(CLOCK_SOURCE_VALID_FOR_HRES | CLOCK_SOURCE_WATCHDOG);
        clocksource_change_rating(cs, 0);
-       cs->flags &= ~CLOCK_SOURCE_WATCHDOG;
        list_del(&cs->wd_list);
 }
 
@@ -142,9 +141,12 @@ static void clocksource_watchdog(unsigned long data)
        }
 
        if (!list_empty(&watchdog_list)) {
-               /* Cycle through CPUs to check if the CPUs stay synchronized to
-                * each other. */
+               /*
+                * Cycle through CPUs to check if the CPUs stay
+                * synchronized to each other.
+                */
                int next_cpu = next_cpu(raw_smp_processor_id(), cpu_online_map);
+
                if (next_cpu >= NR_CPUS)
                        next_cpu = first_cpu(cpu_online_map);
                watchdog_timer.expires += WATCHDOG_INTERVAL;
@@ -170,7 +172,8 @@ static void clocksource_check_watchdog(struct clocksource *cs)
                if (!started && watchdog) {
                        watchdog_last = watchdog->read();
                        watchdog_timer.expires = jiffies + WATCHDOG_INTERVAL;
-                       add_timer_on(&watchdog_timer, first_cpu(cpu_online_map));
+                       add_timer_on(&watchdog_timer,
+                                    first_cpu(cpu_online_map));
                }
        } else {
                if (cs->flags & CLOCK_SOURCE_IS_CONTINUOUS)
@@ -180,7 +183,7 @@ static void clocksource_check_watchdog(struct clocksource *cs)
                        if (watchdog)
                                del_timer(&watchdog_timer);
                        watchdog = cs;
-                       init_timer_deferrable(&watchdog_timer);
+                       init_timer(&watchdog_timer);
                        watchdog_timer.function = clocksource_watchdog;
 
                        /* Reset watchdog cycles */
@@ -192,7 +195,7 @@ static void clocksource_check_watchdog(struct clocksource *cs)
                                watchdog_timer.expires =
                                        jiffies + WATCHDOG_INTERVAL;
                                add_timer_on(&watchdog_timer,
-                                               first_cpu(cpu_online_map));
+                                            first_cpu(cpu_online_map));
                        }
                }
        }
@@ -228,6 +231,18 @@ void clocksource_resume(void)
        spin_unlock_irqrestore(&clocksource_lock, flags);
 }
 
+/**
+ * clocksource_touch_watchdog - Update watchdog
+ *
+ * Update the watchdog after exception contexts such as kgdb so as not
+ * to incorrectly trip the watchdog.
+ *
+ */
+void clocksource_touch_watchdog(void)
+{
+       clocksource_resume_watchdog();
+}
+
 /**
  * clocksource_get_next - Returns the selected clocksource
  *