From nobody Tue May 26 13:32:34 2026 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 4gPtwM2gcYz6fpp2 for ; Tue, 26 May 2026 13:32:35 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gPtwL6221z3jlV for ; Tue, 26 May 2026 13:32:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779802354; 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=bwIcW9tsFu9glyCfOQmFuYs/H6fTWPNVSsMT21ar7To=; b=XprCO3TLEVb+ut3zNJXSVrYpsQATFMdWJ2Xcchexg+dBkwYhNREu0Q9lo+pB3PXdaLIaBD tcUkGZVZ4WEjeBirrZEKkRBvl+g8qnh/oikaqO2712ms2oEaC4k3eH+QgIyuoi0Q7C/Asj KG4MpniGvSR5kiqy99Y6cAIS2YIeln4QX+do3SmWtNoVrea7ON7Uysb7PI+O6fVIAhcMeQ ug8gmuCqNjxBakWP9XBF9xwGcONYUesV+LPC5qJg6j8obEayFcmjhD1KlDihSHh0G5vVt3 Z2PLmOdsyUSWsbyndWL6h4g8uyfQ+L+ukUQlcKpTB5CASpYbCoRGgRuzH65REw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779802354; a=rsa-sha256; cv=none; b=D3WfGVm6NBZ2piUAh+7lyZ3XLSakBB27ZD/IwCDgWXjCgo0xcALSMZsajqk0ArKZl7ndeF cTTIGhn3AARNsOs+d30Z2ZXvjtw74dGctlBVTFJhEClCrxCcgD8VZrUQl3w+26YJxzSMOE 9V0zHQ5lSs19op7Styg6KlxWgCvi618fFmm8qnKp9IK2EqUkk22G/RDrU8Rhw17Dg4yyif 1P1NNhmku9edlAEFWo6dGVGaWQ82OaNdqk/fh+hPfbkOmMyKqzpHR/iVuIFi1LsWueKQN4 wCpWGgXlVDQnwka13RXXpxWx59wc28z29/3xTOSHth4b/HsacX08BwuImw/9nw== 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=1779802354; 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=bwIcW9tsFu9glyCfOQmFuYs/H6fTWPNVSsMT21ar7To=; b=IWJbOFHKLuP1RtiMlMf4KFwn0AqJMo5fZ6JfcOQRiOixnN1445O4uenRilYjuSPXUcnsXJ JatwW3fRWwbO2G16br/a16/NcDiyMSLvhl9v9Jn7YMbHu8OgfPFwCA4fmRCqpLmmvjmH3G VmFP1+xhGsOKBnteLj7klBdeCCr/BRpEYDo3tZlP6h5x9y2uczZG1rR2uyffraG8SYaT4n uk/D1ZQPX1BUxJXYQSI9FN0wZTbd0S3P4XX9OqfgHvwp4K3THPwzBf0r5+fCQjGRnJ8R0g Z3T49XlQHIFSXxHRKiWte3zADRmvnon6HF5Cl9JwS8SseMNHg4BDBYsR14HsTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gPtwL5d8vzL9 for ; Tue, 26 May 2026 13:32:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47575 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 26 May 2026 13:32:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 44eb2883134e - main - acpi: On /dev/power suspend, trigger userspace notifications 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 44eb2883134e465c28468213f79567c64fe26de1 Auto-Submitted: auto-generated Date: Tue, 26 May 2026 13:32:34 +0000 Message-Id: <6a15a0f2.47575.30956a8c@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=44eb2883134e465c28468213f79567c64fe26de1 commit 44eb2883134e465c28468213f79567c64fe26de1 Author: Olivier Certner AuthorDate: 2026-05-25 16:01:10 +0000 Commit: Olivier Certner CommitDate: 2026-05-26 13:32:04 +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 --- 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 8be94db73729..4c6d0c3679c9 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -5064,7 +5064,7 @@ acpi_pm_func(u_long cmd, void *arg, enum power_stype stype) error = EINVAL; goto out; } - if (ACPI_FAILURE(acpi_EnterSleepState(sc, stype))) + if (ACPI_FAILURE(acpi_ReqSleepState(sc, stype))) error = ENXIO; break; default: