Messages in this thread | | | Date | Wed, 20 Jun 2018 10:55:58 +0100 | From | Daniel Thompson <> | Subject | Re: [Kgdb-bugreport] [RFC PATCH 1/2] debug_core: move all watch dog syncs to a single function |
| |
On Mon, Aug 09, 2010 at 12:12:11AM -0500, Jason Wessel wrote: > 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>
Small but sensible tidy up IMHO (whether or not patch 2 is altered).
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
> --- > 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 3c2d497..e4d6819 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) > 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; > -- > 1.6.3.3 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Kgdb-bugreport mailing list > Kgdb-bugreport@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport
| |