diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2008-02-15 15:55:54 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 14:05:38 -0400 |
commit | 7c3078b637882303b1dcf6a16229d0e35f6b60a5 (patch) | |
tree | 4b1456f81627056eff8750e42481c0b00ac84cf0 /kernel | |
parent | d359752407f8916c29ad53a5c30ac73e338f2797 (diff) |
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.c | 4 | ||||
-rw-r--r-- | kernel/time/clocksource.c | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/kernel/kgdb.c b/kernel/kgdb.c index 017ee782bc08..e3f603740425 100644 --- a/kernel/kgdb.c +++ b/kernel/kgdb.c | |||
@@ -28,6 +28,7 @@ | |||
28 | * kind, whether express or implied. | 28 | * kind, whether express or implied. |
29 | */ | 29 | */ |
30 | #include <linux/pid_namespace.h> | 30 | #include <linux/pid_namespace.h> |
31 | #include <linux/clocksource.h> | ||
31 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
32 | #include <linux/spinlock.h> | 33 | #include <linux/spinlock.h> |
33 | #include <linux/console.h> | 34 | #include <linux/console.h> |
@@ -574,6 +575,7 @@ static void kgdb_wait(struct pt_regs *regs) | |||
574 | 575 | ||
575 | /* Signal the primary CPU that we are done: */ | 576 | /* Signal the primary CPU that we are done: */ |
576 | atomic_set(&cpu_in_kgdb[cpu], 0); | 577 | atomic_set(&cpu_in_kgdb[cpu], 0); |
578 | clocksource_touch_watchdog(); | ||
577 | local_irq_restore(flags); | 579 | local_irq_restore(flags); |
578 | } | 580 | } |
579 | #endif | 581 | #endif |
@@ -1396,6 +1398,7 @@ acquirelock: | |||
1396 | atomic_read(&kgdb_cpu_doing_single_step) != cpu) { | 1398 | atomic_read(&kgdb_cpu_doing_single_step) != cpu) { |
1397 | 1399 | ||
1398 | atomic_set(&kgdb_active, -1); | 1400 | atomic_set(&kgdb_active, -1); |
1401 | clocksource_touch_watchdog(); | ||
1399 | local_irq_restore(flags); | 1402 | local_irq_restore(flags); |
1400 | 1403 | ||
1401 | goto acquirelock; | 1404 | goto acquirelock; |
@@ -1487,6 +1490,7 @@ acquirelock: | |||
1487 | kgdb_restore: | 1490 | kgdb_restore: |
1488 | /* Free kgdb_active */ | 1491 | /* Free kgdb_active */ |
1489 | atomic_set(&kgdb_active, -1); | 1492 | atomic_set(&kgdb_active, -1); |
1493 | clocksource_touch_watchdog(); | ||
1490 | local_irq_restore(flags); | 1494 | local_irq_restore(flags); |
1491 | 1495 | ||
1492 | return error; | 1496 | return error; |
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 7f60097d443a..f61402b1f2d0 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c | |||
@@ -222,6 +222,18 @@ void clocksource_resume(void) | |||
222 | } | 222 | } |
223 | 223 | ||
224 | /** | 224 | /** |
225 | * clocksource_touch_watchdog - Update watchdog | ||
226 | * | ||
227 | * Update the watchdog after exception contexts such as kgdb so as not | ||
228 | * to incorrectly trip the watchdog. | ||
229 | * | ||
230 | */ | ||
231 | void clocksource_touch_watchdog(void) | ||
232 | { | ||
233 | clocksource_resume_watchdog(); | ||
234 | } | ||
235 | |||
236 | /** | ||
225 | * clocksource_get_next - Returns the selected clocksource | 237 | * clocksource_get_next - Returns the selected clocksource |
226 | * | 238 | * |
227 | */ | 239 | */ |