From nobody Wed May 13 12:39:48 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 4gFtMS6tL1z6dKtM for ; Wed, 13 May 2026 12:39:48 +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 4gFtMS4p3Jz3vqX for ; Wed, 13 May 2026 12:39:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1778675988; 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=zFZWJar+cNW7vwqbEdnXghkPisnCLu+N2SdNd/AWx/4=; b=i0NkDcrHY1+ybph2wCQouY5Wzo9AjAoNzt2sw8el8cLOLM0LUK5uaoOcrINJ0HDRxfElvC c8maOvPGVxfY4MBwbONxxQAfyUQLyMbO1dX5UYPTtarQJ0cmdBV27bIfVlhG+y9Vh8/68o 4Hh4TAUNsuXU52l7pxXB+snICiOL/RRJYDv2E0+KiDmfpUW0L6xfgez9E+UIm8zh17kP/3 sAmin3JmRjtLvgB5QTuVAwMOC2HgtM1/KITxhtHRa/e/XYkVS/2mGuu0nXteC066igz9t9 Ck5zbArZ8pwBEvwYFAaZ7uHj8U+UWOeC2MYGqKPQVJP7VnNA4LO5XE0odmPkHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1778675988; a=rsa-sha256; cv=none; b=nL2XF/+/VFqnUhzg+aKVKLcAB7ipTNTVPgnHn/EYKxRQLBvd3VsTLg1gtARM0/+j/1XduY jHfaeV0zOSSlq9PNFf7vVuhp6ux+TNECJ5bYsd9z88YFslHZdYNeyLbdUPcgHBrKAcUY5s YCGfmZtfRtl1CTddVRkJt/OEoqpWEb7O2R5jUYn7Fdl3I9d1+yrs7r7DdV4Hu8sPU7hO7M 398CZn6VGo8+8bPBN0ijW/lUxjkiIVzU62yT2ljz2zrBALMeTeOLkd38VAYgadrVie6wTu JwPfxUhcRjuqvN0Ww0KzzDeXaZz7xbbeWOYPJDnWLTCmrZ+MmK85RtLWmvUmPg== 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=1778675988; 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=zFZWJar+cNW7vwqbEdnXghkPisnCLu+N2SdNd/AWx/4=; b=GGvuAOW5VCjcKownXkRLU663IlF4hdViYCY+LWo4/1tfF4y3+v6j5LMmucckQb8umibQDG vWMHchN65xLZXjREve/h1Cnc1mklZi6H5X8cNG3afURwUPlG1s0HGTyY/KWu+BAkyFr0Q2 6/2LTd9+ywyIvCBXnO0jNoLOgtiC/vo9dnvAVIYxpi/79iDJySP2+Oh8YLXSlHNZKhu5HR Us2SZa53J6jU1caAPWZZm0Ocpyxrv73cFXasUbQ26UgwyJEN0rARVmEJYK2pIKUEirw9Qc tgBkc4KJ7rtxfmZrH/B4n4XyBMP4lBL4GAWnXl1kBe2EF+mIXCdLCm3Wvv9G6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gFtMS4Gnszr25 for ; Wed, 13 May 2026 12:39:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1a5a4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 13 May 2026 12:39:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 0cef5efbbf93 - main - acpi_spmc(4): Stop pretending that all constraints are verified 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/main X-Git-Reftype: branch X-Git-Commit: 0cef5efbbf939c3ca89bd29047a230cbedb2c9bb Auto-Submitted: auto-generated Date: Wed, 13 May 2026 12:39:48 +0000 Message-Id: <6a047114.1a5a4.25314d00@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=0cef5efbbf939c3ca89bd29047a230cbedb2c9bb commit 0cef5efbbf939c3ca89bd29047a230cbedb2c9bb Author: Olivier Certner AuthorDate: 2026-05-04 12:04:08 +0000 Commit: Olivier Certner CommitDate: 2026-05-13 12:38:21 +0000 acpi_spmc(4): Stop pretending that all constraints are verified We do not check these constraints (yet), so stop printing that they are verified. While here, make the (not compiled in at the moment) "constraint violated" message more terse, and move the warning it contains to outside of the loop (no need to print it repeatedly if multiple constraints are violated). While here, bail out early if there are no constraints to avoid printing (in the future) that constraints are respected even when there are none. Reviewed by: imp (older version), obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56809 --- sys/dev/acpica/acpi_spmc.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/sys/dev/acpica/acpi_spmc.c b/sys/dev/acpica/acpi_spmc.c index 15b97347e8eb..58197242ff92 100644 --- a/sys/dev/acpica/acpi_spmc.c +++ b/sys/dev/acpica/acpi_spmc.c @@ -655,9 +655,17 @@ acpi_spmc_get_constraints(device_t dev) static void acpi_spmc_check_constraints(struct acpi_spmc_softc *sc) { +#ifdef notyet bool violation = false; +#endif KASSERT(sc->constraints_populated, ("Constraints not populated")); + /* + * Avoid printing that constraints are respected when there are no + * constraints at all. + */ + if (sc->constraint_count == 0) + return; for (size_t i = 0; i < sc->constraint_count; i++) { struct acpi_spmc_constraint *constraint = &sc->constraints[i]; @@ -671,19 +679,24 @@ acpi_spmc_check_constraints(struct acpi_spmc_softc *sc) if (ACPI_FAILURE(acpi_pwr_get_state(constraint->handle, &d_state))) continue; if (d_state < constraint->min_d_state) { - device_printf(sc->dev, "constraint for device %s" - " violated (minimum D-state required was %s, actual" - " D-state is %s), might fail to enter LPI state\n", + device_printf(sc->dev, "Constraint for device %s" + " violated (current D-state: %s, " + "required minimum D-state: %s).\n" constraint->name, - acpi_d_state_to_str(constraint->min_d_state), - acpi_d_state_to_str(d_state)); + acpi_d_state_to_str(d_state), + acpi_d_state_to_str(constraint->min_d_state)); violation = true; } #endif } - if (!violation) +#ifdef notyet + if (violation) + device_printf(sc->dev, "Some constraints violated, " + "might fail to enter a Low-Power Idle state\n"); + else device_printf(sc->dev, - "all device power constraints respected!\n"); + "All device power constraints respected!\n"); +#endif } static void