Commit 16cdc628c3aed47d02205135b7e2f01e0064f566

Authored by Jason Wessel
1 parent fad99fac26

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>

Showing 1 changed file with 9 additions and 6 deletions Side-by-side Diff

kernel/debug/debug_core.c
... ... @@ -470,6 +470,12 @@
470 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 479 static int kgdb_cpu_enter(struct kgdb_state *ks, struct pt_regs *regs)
474 480 {
475 481 unsigned long flags;
... ... @@ -523,8 +529,7 @@
523 529 if (trace_on)
524 530 tracing_on();
525 531 atomic_dec(&cpu_in_kgdb[cpu]);
526   - touch_softlockup_watchdog_sync();
527   - clocksource_touch_watchdog();
  532 + dbg_touch_watchdogs();
528 533 local_irq_restore(flags);
529 534 return 0;
530 535 }
... ... @@ -541,8 +546,7 @@
541 546 (kgdb_info[cpu].task &&
542 547 kgdb_info[cpu].task->pid != kgdb_sstep_pid) && --sstep_tries) {
543 548 atomic_set(&kgdb_active, -1);
544   - touch_softlockup_watchdog_sync();
545   - clocksource_touch_watchdog();
  549 + dbg_touch_watchdogs();
546 550 local_irq_restore(flags);
547 551  
548 552 goto acquirelock;
... ... @@ -659,8 +663,7 @@
659 663 tracing_on();
660 664 /* Free kgdb_active */
661 665 atomic_set(&kgdb_active, -1);
662   - touch_softlockup_watchdog_sync();
663   - clocksource_touch_watchdog();
  666 + dbg_touch_watchdogs();
664 667 local_irq_restore(flags);
665 668  
666 669 return kgdb_info[cpu].ret_state;