From nobody Sun Jan 28 12:47:57 2024 X-Original-To: dev-commits-src-all@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 4TNB6j4ZT5z58WyT; Sun, 28 Jan 2024 12:47:57 +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 4TNB6j43cZz4tXR; Sun, 28 Jan 2024 12:47:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706446077; 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=iSoJpdhxrLZe0rRGxsDQaIyOjupsvjWonYhTuvn3EqY=; b=u4N8Dxs3d+JZjPi3W8wTYtGw6UKcAQfi9jCt2Q+UCXJ03C1ohwucVYnIpLsmxc+UeRNgw+ Rd1JZ7KVkVsXDbsbUwrORg4FZL9nweq+pwmr4s5bYz1PZrtpnCVHCgFyz8WiQsSH3kpcou IZDFvhzT51a9s73ru75H3trH7ou1ACYSPck0zlT0PVjXQDlGccsyiHHLUOvtl03l5WNj1C pd7IxBDG0LT8PHPc+OM4635Vx8hGI4yDop95US/LrUXPVeY2fibhS9n7hYJM01IQ/pPeOG /PtVjYJ5JEdfGOHsDSXJLPWVrzPiPXdhw/zULe4+a18Ry49UHqTk4qhL67eBOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706446077; 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=iSoJpdhxrLZe0rRGxsDQaIyOjupsvjWonYhTuvn3EqY=; b=eHsTgL3oyiCpIx4QlnuriP8KvU8GFvHwSgjIovNYFKMu4BAeaGgxNV6PB3NYRGedyfGPoy vjWESGJ70S0jYDdC42PIf67IqXfVjowA6IoDGdm3lmGcE6Dgx9jL4bhMrU+Yq/xREkJ4B9 kESiRQVSkPyf38sMFQQKbVB8uZBd9jqvh7UZJrk3PQ/hK/zNX0AKoFUgEO6/vYKqslS5zz ax0m7co9ha8owyJyh73gbil/yKbF5iiie0wG4wbU2D6LbmffmdaA4nsriGC986vMUx13Te yvLGjvt/2BtFxwq+xfoCw1ix8dE+4FxqH77PlSrbNmtFgbIlphc7e3Jkb8TDoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706446077; a=rsa-sha256; cv=none; b=lOPziIlOK6y51aweKyphlx8Xg1ijG3RZtFKBUxU1hxIBizinSCEI3a1o+gCeOIYVDhjzxp BLwpt1RK+uQebbgVQVK79FprkuiRka7jjpx+sKTy+TgJwwI/+7lz+U/C4YeXxuITzS8Cbe VebHwMeeeO1DCQSwmF3N+JoYQ6ZN6TsrCdxm4Xp6yFAzCae1luUxn6emP3wkxKHJRGJoXc gKnwecSHF3uPBmy7st5oTeu8EOR8DAQNEulgX5DFfcWU8M22SxnNzwgCtLpDZ+otbZtq/q AmTwnHVVDas1ERXHCpnU/blJZc5xh1LdTvr2C5GBFrkFhQatwVbgyoxtu+hCNw== 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 4TNB6j35XTz17SP; Sun, 28 Jan 2024 12:47:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40SClvR5089336; Sun, 28 Jan 2024 12:47:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SClvua089333; Sun, 28 Jan 2024 12:47:57 GMT (envelope-from git) Date: Sun, 28 Jan 2024 12:47:57 GMT Message-Id: <202401281247.40SClvua089333@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 8fdb26160160 - main - change ipmi watchdog to awlays stop when system is halted List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8fdb26160160c4507eb2f644a982a3e05984cdf6 Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=8fdb26160160c4507eb2f644a982a3e05984cdf6 commit 8fdb26160160c4507eb2f644a982a3e05984cdf6 Author: Andriy Gapon AuthorDate: 2023-01-03 17:26:45 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 12:45:16 +0000 change ipmi watchdog to awlays stop when system is halted That is, wd_shutdown_countdown value is ignored when halting. A halted system should remain halted for as long as needed until a power cycle, so the watchdog should not reset the system. --- sys/dev/ipmi/ipmi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/ipmi/ipmi.c b/sys/dev/ipmi/ipmi.c index 06b0760b002c..efb8a7e7669b 100644 --- a/sys/dev/ipmi/ipmi.c +++ b/sys/dev/ipmi/ipmi.c @@ -766,6 +766,10 @@ ipmi_shutdown_event(void *arg, int howto) * Zero value in wd_shutdown_countdown will disable watchdog; * Negative value in wd_shutdown_countdown will keep existing state; * + * System halt is a special case of shutdown where wd_shutdown_countdown + * is ignored and watchdog is disabled to ensure that the system remains + * halted as requested. + * * Revert to using a power cycle to ensure that the watchdog will * do something useful here. Having the watchdog send an NMI * instead is useless during shutdown, and might be ignored if an @@ -773,7 +777,7 @@ ipmi_shutdown_event(void *arg, int howto) */ wd_in_shutdown = true; - if (wd_shutdown_countdown == 0) { + if (wd_shutdown_countdown == 0 || (howto & RB_HALT) != 0) { /* disable watchdog */ ipmi_set_watchdog(sc, 0); sc->ipmi_watchdog_active = 0;