From nobody Sat Mar 16 15:16:39 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 4Txl881YMVz5F1Ff; Sat, 16 Mar 2024 15:16:40 +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 4Txl880VyBz4HCV; Sat, 16 Mar 2024 15:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602200; 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=kpgeZZ/GMfKF2/CUXXsfksIo5IyIGpq2JAZAhdw7x8c=; b=MRV6KXel5ZvGtWpFoqCOYTFxN2SXHQPjT7+H74GekEB1AdMWr0NR1H8BWOQELDZZQ+Q/N+ GKmb2VVQ2chQ7H+4yCVmeihV7LeM1SOpsT5+IvZDYJnmDRjXFrDhCmyI67aF7YGgQqI528 p50vEz42xzf3mLNdiXgcPgaZi/uoy9WPLzK5iDPWzT33Ubm35QneyFrAQn1iBHysrxodw7 4sIJ55D8ibNVvNqK/8zO86SWz0Kqh62ZI/AkOa8powP5Xi2Rd9gF+/B/WGdqlXr6ICePSr 4h4ewRHV10aunXj3hQv77xtMOOzRKzoJzB51AdcUsLA20auNfKVM+7A/lv+6Pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710602200; a=rsa-sha256; cv=none; b=RRn8x/0Ar3kobnz7cgo3fxXzhLR+iOjVlW+Kuxw235cImMz2G8z+KairwFf6Gh/Cd4sc29 TduiNJ/9lN06hpv6eKi+P5W0VSctmaHnVXe09EB5iEpCb24PWZxs90FJSu1qRKvQL+ab06 ifI+CRR5v5vzwBbKAx+yfESCwBSjNMBdgQ6RoEJa0UkUkqW+zF/OMty72vBUtI/s5kY7aO 3z7lygFkcQdq7eHCp1pKndFtoCdHibpYObPFhtLJmNV3A6OBpGVVcwWcgrjNPBqrz18wHl oK08EJim4hhe20nwsfdwapXH9LBFpcsI838YlINOCVGnXhU5h8dtRXJ3ovZT0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602200; 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=kpgeZZ/GMfKF2/CUXXsfksIo5IyIGpq2JAZAhdw7x8c=; b=iUpJaRI/qtLt2yErL0WRaG46ambM1THssvDTs/5GAgkBNUhboY94nqT//WgGjTPtw40UwK OO4NAjO1HABS0ktQ0gJqlILbJGTdqpSTVHapIpz9qKM1MU4jBQExKyG58O7p8appVOVicu nJjcEU9FDY4IwOGmSl7Z0DmZui1CTz8X7Y2pEvceqUKBEmNcvDEXT/8KUCXLWjZlSU/XGn X6x1jajgH6G8QDT+5kjO46C3u6Pk4lbb6YqERrGioUkXgvoyxo36wKgasz9HKUB7tCT5T7 YausRQREHhTC2MCAs1Y6srtDVtGyLvwg38X4DHQzlpYE0EVu3EqiZQT39pL19Q== 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 4Txl8806C4z106K; Sat, 16 Mar 2024 15:16:40 +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 42GFGdls063150; Sat, 16 Mar 2024 15:16:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42GFGdI3063147; Sat, 16 Mar 2024 15:16:39 GMT (envelope-from git) Date: Sat, 16 Mar 2024 15:16:39 GMT Message-Id: <202403161516.42GFGdI3063147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: b2681df2294b - stable/13 - syscon_power: do reboot after shutdown_panic is executed 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/stable/13 X-Git-Reftype: branch X-Git-Commit: b2681df2294b54c9a293946482843c63455f8818 Auto-Submitted: auto-generated The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=b2681df2294b54c9a293946482843c63455f8818 commit b2681df2294b54c9a293946482843c63455f8818 Author: Andriy Gapon AuthorDate: 2021-07-09 15:00:21 +0000 Commit: Andriy Gapon CommitDate: 2024-03-16 15:14:20 +0000 syscon_power: do reboot after shutdown_panic is executed A syscon_power instance can handle either poweroff or reboot, but not both. If the instance handles reboot then set its priority to be after shutdown_panic. This is to provide uniform experience with other platforms. (cherry picked from commit 5f7312a0d70c607afa9ce24ccd757321d043e02c) --- sys/dev/extres/syscon/syscon_power.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/extres/syscon/syscon_power.c b/sys/dev/extres/syscon/syscon_power.c index 792b9c43773a..2615e3a8f5dd 100644 --- a/sys/dev/extres/syscon/syscon_power.c +++ b/sys/dev/extres/syscon/syscon_power.c @@ -162,9 +162,11 @@ syscon_power_attach(device_t dev) OF_getencprop(node, "value", &sc->value, sizeof(sc->value)); } + /* Handle reboot after shutdown_panic. */ sc->reboot = ofw_bus_is_compatible(dev, "syscon-reboot"); sc->shutdown_tag = EVENTHANDLER_REGISTER(shutdown_final, - syscon_power_shutdown_final, dev, SHUTDOWN_PRI_LAST); + syscon_power_shutdown_final, dev, + sc->reboot ? SHUTDOWN_PRI_LAST + 150 : SHUTDOWN_PRI_LAST); return (0); }