free wdog_kern_pat calls in post-panic paths from under SW_WATCHDOG

Those calls are useful with hardware watchdog drivers too.

MFC after:	3 weeks
This commit is contained in:
Andriy Gapon 2012-06-03 08:01:12 +00:00
parent 29e758c263
commit 7adc598a15
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=236503
5 changed files with 9 additions and 22 deletions

View File

@ -37,9 +37,7 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/kerneldump.h>
#include <sys/msgbuf.h>
#ifdef SW_WATCHDOG
#include <sys/watchdog.h>
#endif
#include <vm/vm.h>
#include <vm/vm_page.h>
#include <vm/pmap.h>
@ -177,9 +175,9 @@ blk_write(struct dumperinfo *di, char *ptr, vm_paddr_t pa, size_t sz)
report_progress(progress, dumpsize);
counter &= (1<<24) - 1;
}
#ifdef SW_WATCHDOG
wdog_kern_pat(WD_LASTVAL);
#endif
if (ptr) {
error = dump_write(di, ptr, 0, dumplo, len);
if (error)

View File

@ -36,9 +36,7 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/kerneldump.h>
#include <sys/msgbuf.h>
#ifdef SW_WATCHDOG
#include <sys/watchdog.h>
#endif
#include <vm/vm.h>
#include <vm/pmap.h>
#include <machine/atomic.h>
@ -143,9 +141,9 @@ blk_write(struct dumperinfo *di, char *ptr, vm_paddr_t pa, size_t sz)
printf(" %lld", PG2MB(progress >> PAGE_SHIFT));
counter &= (1<<24) - 1;
}
#ifdef SW_WATCHDOG
wdog_kern_pat(WD_LASTVAL);
#endif
if (ptr) {
error = dump_write(di, ptr, 0, dumplo, len);
if (error)

View File

@ -66,9 +66,7 @@ __FBSDID("$FreeBSD$");
#include <sys/sysctl.h>
#include <sys/sysproto.h>
#include <sys/vnode.h>
#ifdef SW_WATCHDOG
#include <sys/watchdog.h>
#endif
#include <ddb/ddb.h>
@ -334,9 +332,7 @@ kern_reboot(int howto)
waittime = 0;
#ifdef SW_WATCHDOG
wdog_kern_pat(WD_LASTVAL);
#endif
sys_sync(curthread, NULL);
/*
@ -362,9 +358,8 @@ kern_reboot(int howto)
if (nbusy < pbusy)
iter = 0;
pbusy = nbusy;
#ifdef SW_WATCHDOG
wdog_kern_pat(WD_LASTVAL);
#endif
sys_sync(curthread, NULL);
#ifdef PREEMPTION

View File

@ -73,9 +73,7 @@ __FBSDID("$FreeBSD$");
#include <sys/syslog.h>
#include <sys/vmmeter.h>
#include <sys/vnode.h>
#ifdef SW_WATCHDOG
#include <sys/watchdog.h>
#endif
#include <machine/stdarg.h>
@ -1869,10 +1867,10 @@ sched_sync(void)
LIST_INSERT_HEAD(next, bo, bo_synclist);
continue;
}
#ifdef SW_WATCHDOG
if (first_printf == 0)
wdog_kern_pat(WD_LASTVAL);
#endif
}
if (!LIST_EMPTY(gslp)) {
mtx_unlock(&sync_mtx);

View File

@ -36,9 +36,7 @@ __FBSDID("$FreeBSD$");
#include <sys/sysctl.h>
#include <sys/kernel.h>
#include <sys/kerneldump.h>
#ifdef SW_WATCHDOG
#include <sys/watchdog.h>
#endif
#include <vm/vm.h>
#include <vm/pmap.h>
#include <machine/elf.h>
@ -198,9 +196,9 @@ cb_dumpdata(struct md_pa *mdp, int seqnr, void *arg)
a = pa + i * PAGE_SIZE;
va = pmap_kenter_temporary(trunc_page(a), i);
}
#ifdef SW_WATCHDOG
wdog_kern_pat(WD_LASTVAL);
#endif
error = dump_write(di, va, 0, dumplo, sz);
if (error)
break;