From nobody Thu Aug 11 21:47:03 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M3gPg3kw2z4Xx26; Thu, 11 Aug 2022 21:47:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M3gPg1tt3z3Y9n; Thu, 11 Aug 2022 21:47:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660254423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rCyYiCFVIP8fgvTQQZj7xIuvdk160rOFYeoOCbVsbcQ=; b=wElfGmKJfSXJNB9zwhpJXHkRGS8ZH/6LiSiaEq/+dgPRll0FK4sOBg4RNBmbPXxXaAHHYf sLsYvfWfPbGakiCQ41mORgjnT40iKVgwUctAszBiXCx4e6ohG1FMcZGVV7rJrZ0jVq5iSm s3gzWu8P2EixslH6nUFAxSxu2ok+Cpab7kIYtC9A9yuMtJ2Ot1X1HxBS2tGe9NIqPTCpUN N86UWB+cUF/Pb9lcAX+yHX1Vja+vh22Xee/JQWUMlMOM1NndnEeGhe6lVW5cUf//HLroS9 U/W+ffwugpYPjUwnzPd0QXG2sG06qLm/7T+YqJ4bIrrjOvuIfcl49N6zydAywA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4M3gPg0rkJz16Wc; Thu, 11 Aug 2022 21:47:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27BLl3qA089530; Thu, 11 Aug 2022 21:47:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27BLl362089529; Thu, 11 Aug 2022 21:47:03 GMT (envelope-from git) Date: Thu, 11 Aug 2022 21:47:03 GMT Message-Id: <202208112147.27BLl362089529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 648edd63783e - main - x86: remove MP_WATCHDOG List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 648edd63783ef28e452cde7b07293c6b5ecc6a35 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660254423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rCyYiCFVIP8fgvTQQZj7xIuvdk160rOFYeoOCbVsbcQ=; b=heQM4OWgceUFtkvhBEZZbWPOB1AKsx6ftlj+iSTgFURALCWy6CcoiRONAyMQwlIOPxKHUQ 5HWofoXHusnbDWG0aG3tKAs0Z37NmOoHRLEJBhg5YbbncniKSzVn2uqLhm1o81Q0M2PVjR BGPfLKBRl+12fHNuEA2Mpj6dt5AeAMXliao5TzofjAOQ6P5x6HAKZNKYmxJ1ZGqWlKh2rk MxbqwDROHk8dq0gOD84VLp2Z1as2jB3jlR8WUmByWnPrSrU2BzpULddIjodbEv6a2xpht6 jjKENbb2vClNGGW61pSODjVajd1qL/9U2h39tsCgUtT3X8DSQfMBB/wMUKW7ig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660254423; a=rsa-sha256; cv=none; b=Ysl5FhOJXUHS0AjsE6HQER7NdTFriiu2b5tGAfApwZaI11owGDZV86kqxZeNICanyn4Vz9 7iK/WzeomufMwYThOAIBdx9WlXh6xPv0vkhAsa4yIsQBCJPzOJ12HvFHwfhxqZEf7LSwYl Y6B1ZrCHK19nm8DUbxzjX72bpiBv+3DXLtMlIXilfcOB8LGtNF/GDR6Kl5vVxeG32KJLNA f0jFFc1sF5Sd3HGTPviyjz6LRV7wZSrRzXFrjrmyITYdqkVVNFtdKaLYuFmQyB7biPhNsJ X/m30covpYWNh/iD7d6PKLclqddkEbOMyNVPqHMABG9Wz/ZJL3KJIZ3KHlxriQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=648edd63783ef28e452cde7b07293c6b5ecc6a35 commit 648edd63783ef28e452cde7b07293c6b5ecc6a35 Author: Mateusz Guzik AuthorDate: 2022-08-09 20:34:46 +0000 Commit: Mateusz Guzik CommitDate: 2022-08-11 21:35:32 +0000 x86: remove MP_WATCHDOG It does not work with ULE, which is the default scheduler for over a decade. Reviewed by: emaste, kib Differential Revision: https://reviews.freebsd.org/D36094 --- sys/amd64/amd64/machdep.c | 2 - sys/amd64/conf/NOTES | 5 - sys/amd64/include/mp_watchdog.h | 36 ------- sys/conf/files.x86 | 1 - sys/conf/options.amd64 | 1 - sys/conf/options.i386 | 1 - sys/i386/conf/NOTES | 5 - sys/i386/i386/machdep.c | 2 - sys/i386/include/mp_watchdog.h | 36 ------- sys/x86/x86/cpu_machdep.c | 5 - sys/x86/x86/mp_watchdog.c | 212 ---------------------------------------- 11 files changed, 306 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 8174a8e850c8..05342b31d2aa 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include "opt_isa.h" #include "opt_kstack_pages.h" #include "opt_maxmem.h" -#include "opt_mp_watchdog.h" #include "opt_pci.h" #include "opt_platform.h" #include "opt_sched.h" @@ -126,7 +125,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include diff --git a/sys/amd64/conf/NOTES b/sys/amd64/conf/NOTES index ba6e99c0f8eb..42cc23d076b9 100644 --- a/sys/amd64/conf/NOTES +++ b/sys/amd64/conf/NOTES @@ -43,11 +43,6 @@ options IPI_PREEMPTION device atpic # Optional legacy pic support device mptable # Optional MPSPEC mptable support -# -# Watchdog routines. -# -options MP_WATCHDOG - # Debugging options. # options COUNT_XINVLTLB_HITS # Counters for TLB events diff --git a/sys/amd64/include/mp_watchdog.h b/sys/amd64/include/mp_watchdog.h deleted file mode 100644 index e1fc0742ee1e..000000000000 --- a/sys/amd64/include/mp_watchdog.h +++ /dev/null @@ -1,36 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2004 Robert N. M. Watson - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#ifndef _MACHINE_MP_WATCHDOG_H_ -#define _MACHINE_MP_WATCHDOG_H_ - -void ap_watchdog(u_int cpuid); - -#endif /* !_MACHINE_MP_WATCHDOG_H_ */ diff --git a/sys/conf/files.x86 b/sys/conf/files.x86 index a78570a423c9..8478afab972f 100644 --- a/sys/conf/files.x86 +++ b/sys/conf/files.x86 @@ -335,7 +335,6 @@ x86/x86/legacy.c standard x86/x86/mca.c standard x86/x86/x86_mem.c optional mem x86/x86/mp_x86.c optional smp -x86/x86/mp_watchdog.c optional mp_watchdog smp x86/x86/nexus.c standard x86/x86/pvclock.c optional kvm_clock | xenhvm x86/x86/stack_machdep.c optional ddb | stack diff --git a/sys/conf/options.amd64 b/sys/conf/options.amd64 index bc809553f841..8b98aa405953 100644 --- a/sys/conf/options.amd64 +++ b/sys/conf/options.amd64 @@ -8,7 +8,6 @@ COUNT_XINVLTLB_HITS opt_smp.h COUNT_IPIS opt_smp.h MAXMEM MPTABLE_FORCE_HTT -MP_WATCHDOG NKPT opt_pmap.h PV_STATS opt_pmap.h diff --git a/sys/conf/options.i386 b/sys/conf/options.i386 index 37b112e1e6e9..f65592653a82 100644 --- a/sys/conf/options.i386 +++ b/sys/conf/options.i386 @@ -10,7 +10,6 @@ DISABLE_PG_G opt_pmap.h DISABLE_PSE opt_pmap.h MAXMEM MPTABLE_FORCE_HTT -MP_WATCHDOG NKPT opt_pmap.h PERFMON PMAP_SHPGPERPROC opt_pmap.h diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES index 42aafcecd97b..882b755db67a 100644 --- a/sys/i386/conf/NOTES +++ b/sys/i386/conf/NOTES @@ -60,11 +60,6 @@ device apic # I/O apic options MPTABLE_FORCE_HTT # Enable HTT CPUs with the MP Table options IPI_PREEMPTION -# -# Watchdog routines. -# -options MP_WATCHDOG - # Debugging options. # options COUNT_XINVLTLB_HITS # Counters for TLB events diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 5bec6196ba27..41759c07e3d3 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include "opt_isa.h" #include "opt_kstack_pages.h" #include "opt_maxmem.h" -#include "opt_mp_watchdog.h" #include "opt_perfmon.h" #include "opt_platform.h" @@ -125,7 +124,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include diff --git a/sys/i386/include/mp_watchdog.h b/sys/i386/include/mp_watchdog.h deleted file mode 100644 index e1fc0742ee1e..000000000000 --- a/sys/i386/include/mp_watchdog.h +++ /dev/null @@ -1,36 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2004 Robert N. M. Watson - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#ifndef _MACHINE_MP_WATCHDOG_H_ -#define _MACHINE_MP_WATCHDOG_H_ - -void ap_watchdog(u_int cpuid); - -#endif /* !_MACHINE_MP_WATCHDOG_H_ */ diff --git a/sys/x86/x86/cpu_machdep.c b/sys/x86/x86/cpu_machdep.c index 759d9e8c6c95..7127ca99999e 100644 --- a/sys/x86/x86/cpu_machdep.c +++ b/sys/x86/x86/cpu_machdep.c @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include "opt_kdb.h" #include "opt_kstack_pages.h" #include "opt_maxmem.h" -#include "opt_mp_watchdog.h" #include "opt_platform.h" #include "opt_sched.h" #ifdef __i386__ @@ -81,7 +80,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #ifdef SMP #include @@ -656,9 +654,6 @@ cpu_idle(int busy) sbintime_t sbt = -1; CTR1(KTR_SPARE2, "cpu_idle(%d)", busy); -#ifdef MP_WATCHDOG - ap_watchdog(PCPU_GET(cpuid)); -#endif /* If we are busy - try to use fast methods. */ if (busy) { diff --git a/sys/x86/x86/mp_watchdog.c b/sys/x86/x86/mp_watchdog.c deleted file mode 100644 index 0823f90d060e..000000000000 --- a/sys/x86/x86/mp_watchdog.c +++ /dev/null @@ -1,212 +0,0 @@ -/*- - * Copyright (c) 2004 Robert N. M. Watson - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#include "opt_mp_watchdog.h" -#include "opt_sched.h" - -#ifdef SCHED_ULE -#error MP_WATCHDOG cannot currently be used with SCHED_ULE -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -/* - * mp_watchdog hijacks the idle thread on a specified CPU, prevents new work - * from being scheduled there, and uses it as a "watchdog" to detect kernel - * failure on other CPUs. This is made reasonable by inclusion of logical - * processors in Xeon hardware. The watchdog is configured by setting the - * debug.watchdog sysctl/tunable to the CPU of interest. A callout will then - * begin executing reseting a timer that is gradually lowered by the watching - * thread. If the timer reaches 0, the watchdog fires by ether dropping - * directly to the debugger, or by sending an NMI IPI to the boot processor. - * This is a somewhat less efficient substitute for dedicated watchdog - * hardware, but can be quite an effective tool for debugging hangs. - * - * XXXRW: This should really use the watchdog(9)/watchdog(4) framework, but - * doesn't yet. - */ -static int watchdog_cpu = -1; -static int watchdog_dontfire = 1; -static int watchdog_timer = -1; -static int watchdog_nmi = 1; - -SYSCTL_INT(_debug, OID_AUTO, watchdog_nmi, CTLFLAG_RWTUN, &watchdog_nmi, 0, - "IPI the boot processor with an NMI to enter the debugger"); - -static struct callout watchdog_callout; - -static void watchdog_change(int wdcpu); - -/* - * Number of seconds before the watchdog will fire if the callout fails to - * reset the timer. - */ -#define WATCHDOG_THRESHOLD 10 - -static void -watchdog_init(void *arg) -{ - - callout_init(&watchdog_callout, 1); - if (watchdog_cpu != -1) - watchdog_change(watchdog_cpu); -} - -/* - * This callout resets a timer until the watchdog kicks in. It acquires some - * critical locks to make sure things haven't gotten wedged with those locks - * held. - */ -static void -watchdog_function(void *arg) -{ - - /* - * Since the timer ran, we must not be wedged. Acquire some critical - * locks to make sure. Then reset the timer. - */ - mtx_lock(&Giant); - watchdog_timer = WATCHDOG_THRESHOLD; - mtx_unlock(&Giant); - callout_reset(&watchdog_callout, 1 * hz, watchdog_function, NULL); -} -SYSINIT(watchdog_init, SI_SUB_DRIVERS, SI_ORDER_ANY, watchdog_init, NULL); - -static void -watchdog_change(int wdcpu) -{ - - if (wdcpu == -1 || wdcpu == 0xffffffff) { - /* - * Disable the watchdog. - */ - watchdog_cpu = -1; - watchdog_dontfire = 1; - callout_stop(&watchdog_callout); - printf("watchdog stopped\n"); - } else { - watchdog_timer = WATCHDOG_THRESHOLD; - watchdog_dontfire = 0; - watchdog_cpu = wdcpu; - callout_reset(&watchdog_callout, 1 * hz, watchdog_function, - NULL); - } -} - -/* - * This sysctl sets which CPU is the watchdog CPU. Set to -1 or 0xffffffff - * to disable the watchdog. - */ -static int -sysctl_watchdog(SYSCTL_HANDLER_ARGS) -{ - int error, temp; - - temp = watchdog_cpu; - error = sysctl_handle_int(oidp, &temp, 0, req); - if (error) - return (error); - - if (req->newptr != NULL) - watchdog_change(temp); - return (0); -} -SYSCTL_PROC(_debug, OID_AUTO, watchdog, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, - 0, 0, sysctl_watchdog, "I", - ""); - -/* - * Drop into the debugger by sending an IPI NMI to the boot processor. - */ -static void -watchdog_ipi_nmi(void) -{ - - /* - * Deliver NMI to the boot processor. Why not? - */ - lapic_ipi_raw(APIC_DEST_DESTFLD | APIC_TRIGMOD_EDGE | - APIC_LEVEL_ASSERT | APIC_DESTMODE_PHY | APIC_DELMODE_NMI, - boot_cpu_id); - lapic_ipi_wait(-1); -} - -/* - * ap_watchdog() is called by the SMP idle loop code. It works on the same - * premise that the disabling of logical processors does: that if the cpu is - * idle, then it can ignore the world from then on, as nothing will be - * scheduled on it. Leaving aside multi-runqueue schedulers (SCHED_ULE) and - * explicit process migration (sched_bind()), this is not an unreasonable - * assumption. - */ -void -ap_watchdog(u_int cpuid) -{ - char old_pcomm[MAXCOMLEN + 1]; - struct proc *p; - - if (watchdog_cpu != cpuid) - return; - - printf("watchdog started on cpu %d\n", cpuid); - p = curproc; - bcopy(p->p_comm, old_pcomm, MAXCOMLEN + 1); - snprintf(p->p_comm, MAXCOMLEN + 1, "mp_watchdog cpu %d", cpuid); - while (1) { - DELAY(1000000); /* One second. */ - if (watchdog_cpu != cpuid) - break; - atomic_subtract_int(&watchdog_timer, 1); - if (watchdog_timer < 4) - printf("Watchdog timer: %d\n", watchdog_timer); - if (watchdog_timer == 0 && watchdog_dontfire == 0) { - printf("Watchdog firing!\n"); - watchdog_dontfire = 1; - if (watchdog_nmi) - watchdog_ipi_nmi(); - else - kdb_enter(KDB_WHY_WATCHDOG, "mp_watchdog"); - } - } - bcopy(old_pcomm, p->p_comm, MAXCOMLEN + 1); - printf("watchdog stopped on cpu %d\n", cpuid); -}