diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2010-08-06 12:47:14 -0400 |
---|---|---|
committer | Jason Wessel <jason.wessel@windriver.com> | 2010-10-22 16:34:10 -0400 |
commit | 16cdc628c3aed47d02205135b7e2f01e0064f566 (patch) | |
tree | 8f8709ee2b9e2c5f38e1261dcc773887d092f73d /kernel/debug | |
parent | fad99fac2627e2cc0ebfe07fcb5046c0b4e103f9 (diff) |
debug_core: move all watch dog syncs to a single function
Move the various clock and watch dog syncs to a single function in
advance of adding another sync for the rcu stall detector.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Diffstat (limited to 'kernel/debug')
-rw-r--r-- | kernel/debug/debug_core.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/kernel/debug/debug_core.c b/kernel/debug/debug_core.c index de407c78178..c812857d0b8 100644 --- a/kernel/debug/debug_core.c +++ b/kernel/debug/debug_core.c | |||
@@ -470,6 +470,12 @@ static void dbg_cpu_switch(int cpu, int next_cpu) | |||
470 | kgdb_info[next_cpu].exception_state |= DCPU_NEXT_MASTER; | 470 | kgdb_info[next_cpu].exception_state |= DCPU_NEXT_MASTER; |
471 | } | 471 | } |
472 | 472 | ||
473 | static void dbg_touch_watchdogs(void) | ||
474 | { | ||
475 | touch_softlockup_watchdog_sync(); | ||
476 | clocksource_touch_watchdog(); | ||
477 | } | ||
478 | |||
473 | static int kgdb_cpu_enter(struct kgdb_state *ks, struct pt_regs *regs) | 479 | static int kgdb_cpu_enter(struct kgdb_state *ks, struct pt_regs *regs) |
474 | { | 480 | { |
475 | unsigned long flags; | 481 | unsigned long flags; |
@@ -523,8 +529,7 @@ return_normal: | |||
523 | if (trace_on) | 529 | if (trace_on) |
524 | tracing_on(); | 530 | tracing_on(); |
525 | atomic_dec(&cpu_in_kgdb[cpu]); | 531 | atomic_dec(&cpu_in_kgdb[cpu]); |
526 | touch_softlockup_watchdog_sync(); | 532 | dbg_touch_watchdogs(); |
527 | clocksource_touch_watchdog(); | ||
528 | local_irq_restore(flags); | 533 | local_irq_restore(flags); |
529 | return 0; | 534 | return 0; |
530 | } | 535 | } |
@@ -541,8 +546,7 @@ return_normal: | |||
541 | (kgdb_info[cpu].task && | 546 | (kgdb_info[cpu].task && |
542 | kgdb_info[cpu].task->pid != kgdb_sstep_pid) && --sstep_tries) { | 547 | kgdb_info[cpu].task->pid != kgdb_sstep_pid) && --sstep_tries) { |
543 | atomic_set(&kgdb_active, -1); | 548 | atomic_set(&kgdb_active, -1); |
544 | touch_softlockup_watchdog_sync(); | 549 | dbg_touch_watchdogs(); |
545 | clocksource_touch_watchdog(); | ||
546 | local_irq_restore(flags); | 550 | local_irq_restore(flags); |
547 | 551 | ||
548 | goto acquirelock; | 552 | goto acquirelock; |
@@ -659,8 +663,7 @@ kgdb_restore: | |||
659 | tracing_on(); | 663 | tracing_on(); |
660 | /* Free kgdb_active */ | 664 | /* Free kgdb_active */ |
661 | atomic_set(&kgdb_active, -1); | 665 | atomic_set(&kgdb_active, -1); |
662 | touch_softlockup_watchdog_sync(); | 666 | dbg_touch_watchdogs(); |
663 | clocksource_touch_watchdog(); | ||
664 | local_irq_restore(flags); | 667 | local_irq_restore(flags); |
665 | 668 | ||
666 | return kgdb_info[cpu].ret_state; | 669 | return kgdb_info[cpu].ret_state; |