Skip to content

Commit

Permalink
debug_core: move all watch dog syncs to a single function
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jwessel committed Oct 22, 2010
1 parent fad99fa commit 16cdc62
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions kernel/debug/debug_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,12 @@ static void dbg_cpu_switch(int cpu, int next_cpu)
kgdb_info[next_cpu].exception_state |= DCPU_NEXT_MASTER;
}

static void dbg_touch_watchdogs(void)
{
touch_softlockup_watchdog_sync();
clocksource_touch_watchdog();
}

static int kgdb_cpu_enter(struct kgdb_state *ks, struct pt_regs *regs)
{
unsigned long flags;
Expand Down Expand Up @@ -523,8 +529,7 @@ static int kgdb_cpu_enter(struct kgdb_state *ks, struct pt_regs *regs)
if (trace_on)
tracing_on();
atomic_dec(&cpu_in_kgdb[cpu]);
touch_softlockup_watchdog_sync();
clocksource_touch_watchdog();
dbg_touch_watchdogs();
local_irq_restore(flags);
return 0;
}
Expand All @@ -541,8 +546,7 @@ static int kgdb_cpu_enter(struct kgdb_state *ks, struct pt_regs *regs)
(kgdb_info[cpu].task &&
kgdb_info[cpu].task->pid != kgdb_sstep_pid) && --sstep_tries) {
atomic_set(&kgdb_active, -1);
touch_softlockup_watchdog_sync();
clocksource_touch_watchdog();
dbg_touch_watchdogs();
local_irq_restore(flags);

goto acquirelock;
Expand Down Expand Up @@ -659,8 +663,7 @@ static int kgdb_cpu_enter(struct kgdb_state *ks, struct pt_regs *regs)
tracing_on();
/* Free kgdb_active */
atomic_set(&kgdb_active, -1);
touch_softlockup_watchdog_sync();
clocksource_touch_watchdog();
dbg_touch_watchdogs();
local_irq_restore(flags);

return kgdb_info[cpu].ret_state;
Expand Down

0 comments on commit 16cdc62

Please sign in to comment.