svn commit: r225507 - stable/8/sys/kern
Attilio Rao
attilio at FreeBSD.org
Mon Sep 12 11:18:55 UTC 2011
Author: attilio
Date: Mon Sep 12 11:18:54 2011
New Revision: 225507
URL: http://svn.freebsd.org/changeset/base/225507
Log:
MFC r225372:
Disable the watchdog while a KDB backend is running and kick it again
just before to return KDB context.
Sponsored by: Sandvine Incorporated
Modified:
stable/8/sys/kern/subr_kdb.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
Modified: stable/8/sys/kern/subr_kdb.c
==============================================================================
--- stable/8/sys/kern/subr_kdb.c Mon Sep 12 10:07:21 2011 (r225506)
+++ stable/8/sys/kern/subr_kdb.c Mon Sep 12 11:18:54 2011 (r225507)
@@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$");
#include "opt_kdb.h"
#include "opt_stack.h"
+#include "opt_watchdog.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -40,6 +41,9 @@ __FBSDID("$FreeBSD$");
#include <sys/smp.h>
#include <sys/stack.h>
#include <sys/sysctl.h>
+#ifdef SW_WATCHDOG
+#include <sys/watchdog.h>
+#endif
#include <machine/kdb.h>
#include <machine/pcb.h>
@@ -513,6 +517,9 @@ int
kdb_trap(int type, int code, struct trapframe *tf)
{
struct kdb_dbbe *be;
+#ifdef SW_WATCHDOG
+ u_int wdoglvt;
+#endif
register_t intr;
#ifdef SMP
int did_stop_cpus;
@@ -529,6 +536,10 @@ kdb_trap(int type, int code, struct trap
intr = intr_disable();
+#ifdef SW_WATCHDOG
+ wdoglvt = wdog_kern_last_timeout();
+ wdog_kern_pat(WD_TO_NEVER);
+#endif
#ifdef SMP
if ((did_stop_cpus = kdb_stop_cpus) != 0)
stop_cpus_hard(PCPU_GET(other_cpus));
@@ -560,6 +571,9 @@ kdb_trap(int type, int code, struct trap
if (did_stop_cpus)
restart_cpus(stopped_cpus);
#endif
+#ifdef SW_WATCHDOG
+ wdog_kern_pat(wdoglvt);
+#endif
intr_restore(intr);
More information about the svn-src-stable
mailing list