]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
kgdb: clocksource watchdog
authorJason Wessel <jason.wessel@windriver.com>
Fri, 15 Feb 2008 20:55:54 +0000 (14:55 -0600)
committerIngo Molnar <mingo@elte.hu>
Thu, 17 Apr 2008 18:05:38 +0000 (20:05 +0200)
In order to not trip the clocksource watchdog, kgdb must touch the
clocksource watchdog on the return to normal system run state.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/clocksource.h
kernel/kgdb.c
kernel/time/clocksource.c

index 85778a4b120906870970f25f8e987fdc7ece95e6..35094479ca557012e043ea0def0fbf9b6df11e65 100644 (file)
@@ -216,6 +216,7 @@ static inline void clocksource_calculate_interval(struct clocksource *c,
 /* used to install a new clocksource */
 extern int clocksource_register(struct clocksource*);
 extern void clocksource_unregister(struct clocksource*);
+extern void clocksource_touch_watchdog(void);
 extern struct clocksource* clocksource_get_next(void);
 extern void clocksource_change_rating(struct clocksource *cs, int rating);
 extern void clocksource_resume(void);
index 017ee782bc088861129e60ef29587257883d9fc7..e3f6037404256412f595fb921ee0824640b9f184 100644 (file)
@@ -28,6 +28,7 @@
  * kind, whether express or implied.
  */
 #include <linux/pid_namespace.h>
+#include <linux/clocksource.h>
 #include <linux/interrupt.h>
 #include <linux/spinlock.h>
 #include <linux/console.h>
@@ -574,6 +575,7 @@ static void kgdb_wait(struct pt_regs *regs)
 
        /* Signal the primary CPU that we are done: */
        atomic_set(&cpu_in_kgdb[cpu], 0);
+       clocksource_touch_watchdog();
        local_irq_restore(flags);
 }
 #endif
@@ -1396,6 +1398,7 @@ acquirelock:
            atomic_read(&kgdb_cpu_doing_single_step) != cpu) {
 
                atomic_set(&kgdb_active, -1);
+               clocksource_touch_watchdog();
                local_irq_restore(flags);
 
                goto acquirelock;
@@ -1487,6 +1490,7 @@ acquirelock:
 kgdb_restore:
        /* Free kgdb_active */
        atomic_set(&kgdb_active, -1);
+       clocksource_touch_watchdog();
        local_irq_restore(flags);
 
        return error;
index 7f60097d443a6258b2044a37b5d23f0d4656aaca..f61402b1f2d0791e89078bdac94321a69bad4253 100644 (file)
@@ -221,6 +221,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
  *