]> git.karo-electronics.de Git - linux-beck.git/commitdiff
debug_core: move all watch dog syncs to a single function
authorJason Wessel <jason.wessel@windriver.com>
Fri, 6 Aug 2010 16:47:14 +0000 (11:47 -0500)
committerJason Wessel <jason.wessel@windriver.com>
Fri, 22 Oct 2010 20:34:10 +0000 (15:34 -0500)
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>
kernel/debug/debug_core.c

index de407c78178d9014332255f2d8ae412f9fbd5e5a..c812857d0b808b3b6254f4586429957140ddcceb 100644 (file)
@@ -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;
@@ -523,8 +529,7 @@ return_normal:
                        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;
                }
@@ -541,8 +546,7 @@ return_normal:
            (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;
@@ -659,8 +663,7 @@ kgdb_restore:
                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;