From nobody Thu Jul 23 10:00:51 2026 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 4h5RTJ00wxz6lVvS for ; Thu, 23 Jul 2026 10:00:52 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h5RTH3CDWz3WJ7 for ; Thu, 23 Jul 2026 10:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784800851; 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=JoFUVgQaudEGl8OHl8HCrIoO52NhoYhMFoout8W2uX0=; b=bubLznPD2AOtZCS1sO9sIssWmgJwPvGRHozJHojzemv7CLVtlVZOgd2Lq/RcsMd0TtRJZ+ gSww+ZnG5rh7kMGyeRM8O/uQ2fY8EYosxtK76BMl9QfXNACNO3ClY15wsVSlR24gM3xwAq mCZvzvIKztH2A4Re7kiVmx/0/ALDqN3q2voCRafPgFRruaVQxqk15do3Qq2nwRfViH9tmi jfYs4er7CljbiX5JLrm7qFXpLYtIu6yVpa+TnD67rLQCQFFaIxbP3CpXCped4IuD1k8d6d BVc+9DJfWtk+NsEV+DqgcYXrLfZMz2v8ifAGkFwSO7eLxTYh7mRHNbR3hpLLuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1784800851; a=rsa-sha256; cv=none; b=Tu4lgTp70Dkhn1VvZyDPEeYUNv2NcT4dXCwa2zsQBPzwebO7WaqOlsQCI7TfIQbaVVlRfS y3nhd/W0oTBio6xTIPxSXi1rIb9t3FhIT9CrRQ+weXEo74yGbSYZ1YtVOUwzB2ArNbjXRB 2Xqo04B7VZ9pT1X9LpwNW6aJoKQjPS3gbpFk5eLbZfuU72USfAGdNA/qG2fIH1wHghcSaj AWGZnZ1lWAkxKKMr31k/TsnwBJOdssVsyBnWpL+dzRjx9Eu2fjZ1S65M4FSjIbu51/Niol ItSpXPhOXP0sn4620x+qho35p2tQ8+pauswejlBH2dobZCD1ONvPmmYBOT50OA== 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=1784800851; 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=JoFUVgQaudEGl8OHl8HCrIoO52NhoYhMFoout8W2uX0=; b=apYEZgga3pBy0qHIY4/tiKWJMfPkx+RKjGbMr0jRlom7n+T4yfs0fr6fYv1xMH5Kkeaq7v 1thPAlraShuk8yuqQgl1cPBw//c17Qm9zYVBH+mW8nXLmdtgRR52Fu7Z4d7JhpKCoZFjH5 xO/YCdHmDMnhFFX1U9Kg03UueT2gAFFduq5mAsJWgMWmIv89l5yZTLU62V4iTvhOw8A8Bj JYDsrQOcW/7IDa+UA0BTjU67sQnX7cizbUSwYbGrvxQ3sCzjcA3icBhH4cczpZElvzDs18 UTV1xqIUzfXp5FBslcBKblFhW3nyVSlI9obWCzhuwtKbv+imbnvf1aMtgXMlHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h5RTH2H3Pz10fy for ; Thu, 23 Jul 2026 10:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3bcc6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 23 Jul 2026 10:00:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 5af7d6930bf3 - stable/14 - acpi: On /dev/power suspend, trigger userspace notifications 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5af7d6930bf32a980b99c830e3fe58149771d177 Auto-Submitted: auto-generated Date: Thu, 23 Jul 2026 10:00:51 +0000 Message-Id: <6a61e653.3bcc6.87f0caa@gitrepo.freebsd.org> The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=5af7d6930bf32a980b99c830e3fe58149771d177 commit 5af7d6930bf32a980b99c830e3fe58149771d177 Author: Olivier Certner AuthorDate: 2026-05-25 16:01:10 +0000 Commit: Olivier Certner CommitDate: 2026-07-23 09:59:08 +0000 acpi: On /dev/power suspend, trigger userspace notifications On a suspend request via ioctl(), /dev/acpi (and compatible /dev/apm) both call acpi_ReqSleepState() instead of directly calling acpi_EnterSleepState(). The former does more checks, returns success if the machine is already suspending, and notifies user space (via devd(8)) about the impending suspend. In other words, it seems to have been designed for user consumption more than the latter function. So, use acpi_ReqSleepState() in place of acpi_EnterSleepState() in acpi_pm_func(), which is ultimately called by power_pm_suspend(), itself called by power_ioctl(). Other callers of power_pm_suspend() (such as the console drivers) are also user-facing facilities, so should also benefit from this change. Reviewed by: mhorne, imp Tested by: mhorne MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57239 (cherry picked from commit 44eb2883134e465c28468213f79567c64fe26de1) --- sys/dev/acpica/acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index e9c346e371d9..bf8d2d59c83a 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -4731,7 +4731,7 @@ acpi_pm_func(u_long cmd, void *arg, ...) goto out; } - if (ACPI_FAILURE(acpi_EnterSleepState(sc, acpi_state))) + if (ACPI_FAILURE(acpi_ReqSleepState(sc, acpi_state))) error = ENXIO; break; default: