summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2008-02-15 14:55:54 -0600
committerIngo Molnar <mingo@elte.hu>2008-04-17 20:05:38 +0200
commit7c3078b637882303b1dcf6a16229d0e35f6b60a5 (patch)
tree4b1456f81627056eff8750e42481c0b00ac84cf0 /kernel
parentd359752407f8916c29ad53a5c30ac73e338f2797 (diff)
downloadop-kernel-dev-7c3078b637882303b1dcf6a16229d0e35f6b60a5.zip
op-kernel-dev-7c3078b637882303b1dcf6a16229d0e35f6b60a5.tar.gz
kgdb: clocksource watchdog
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>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kgdb.c4
-rw-r--r--kernel/time/clocksource.c12
2 files changed, 16 insertions, 0 deletions
diff --git a/kernel/kgdb.c b/kernel/kgdb.c
index 017ee78..e3f6037 100644
--- a/kernel/kgdb.c
+++ b/kernel/kgdb.c
@@ -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;
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 7f60097..f61402b 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -222,6 +222,18 @@ void clocksource_resume(void)
}
/**
+ * 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
*
*/
OpenPOWER on IntegriCloud