From nobody Wed May 13 12:39:50 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 4gFtMW0ZHfz6dKtp for ; Wed, 13 May 2026 12:39:51 +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 4gFtMV620gz3vqf for ; Wed, 13 May 2026 12:39:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1778675990; 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=ibP/A95FBWE1zAZOj+/FNiCs6vZY7X3hTHiIxsrFzrs=; b=xOqLFawuxNR9lw9Dxs5nPWlzowxsBJ1fSSa9FN46LdPBaWdejlyfU4gPWKf44xbCsOEYbz s/WiMnmVH0yrWbrv5LWyzxU2IkUosgRPuJFHM2gNR3SK9TAEdwJ/YYq3s7NmXecPlya1s4 ufm8vWdA6ixKhK9TqeG56dvw4YJWvS66IaV3Js4ABfygZRTSYb6/an3NLAIBuKqqmW7zKr /OvDFLtEu/IrZBfuYfkPTBJbAxYGt3HY3HYt4/iNQ2yxg+O/Kl6yOs7DK8dXIQr6h5JUhu qAhZj0k0eK7nX063rS21LtHpdT93FK9GCKVGMgfUaIgj/pgjTI5yasR3pAoPdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1778675990; a=rsa-sha256; cv=none; b=RGpeLCdxYLBwR1IvChKMiCyuH30IPMnt9Fbc9M0K2Lm5tYRDD0ukA171YNfg3Uy4Corigm 2rfr328UDdOPqNLT0kxsZbEiRjuznGMwW5R5gVL5thIWeb7csv2LvtaoBF1MUbNiTFbM+a WrzZ6GAxhq6ED+zFAMF8URf8m2vsMWyz9VcSOeu7gL3I7Qt6Xva5AV8R9crOg2nPls1F6O 3i8rT8AT84Q5T/BRSJwogHltmw7ILZPnhjtkQKkANi/56Yx7RJVfXitqhl8Kk/BKNsHPf4 xEA3CBkuuUcehpDJFJzNSVr1zn2GpQBWjd5J9SP1UGt0NXYgkNm7CNJq67lPmA== 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=1778675990; 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=ibP/A95FBWE1zAZOj+/FNiCs6vZY7X3hTHiIxsrFzrs=; b=gLkfzNRcKat21kzlqBzpgNQfrULP0E1QMifawSAuGgzbCYntP1tYb7edLK0vvd0qvSfAiy MVTv7MspELC+K403bppphtxjfnX3Ccdo82EzNwG2y8wRceSPhswb3R8L6iRQiKoo05nnV6 DnOZWAg99MEk5rT70XHlhQAiGK96pAbjJTcRy/phzKfHyREwQqfVzB4TmeNICF0H6nrh9c TvpqOGdQ7dwKtr3053FNKOoTHaf4pfse/v01S/ndRZi0D/WrBXUH2I1H6VC/rGb536/fKL Ew7NdH1RO/ezi4wzgkgmX5mJVcFN2KaubWDfWgkYOzUGD/6k5QbnvTLx4EEm+A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gFtMV5X7qzr6Q for ; Wed, 13 May 2026 12:39:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19f4c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 13 May 2026 12:39:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: ebad66abbc1f - main - acpi_spmc(4): Print supported functions after DSMs 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: ebad66abbc1f25a761add6481de99abf474b2d87 Auto-Submitted: auto-generated Date: Wed, 13 May 2026 12:39:50 +0000 Message-Id: <6a047116.19f4c.69d42c69@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=ebad66abbc1f25a761add6481de99abf474b2d87 commit ebad66abbc1f25a761add6481de99abf474b2d87 Author: Olivier Certner AuthorDate: 2026-05-04 16:19:31 +0000 Commit: Olivier Certner CommitDate: 2026-05-13 12:38:22 +0000 acpi_spmc(4): Print supported functions after DSMs This makes things more top-down, as expected when probing devices. Reviewed by: imp, obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56811 --- sys/dev/acpica/acpi_spmc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/dev/acpica/acpi_spmc.c b/sys/dev/acpica/acpi_spmc.c index 939f254fbf7f..33915b536667 100644 --- a/sys/dev/acpica/acpi_spmc.c +++ b/sys/dev/acpica/acpi_spmc.c @@ -326,7 +326,7 @@ failed_to_call_dsm(const struct acpi_spmc_softc *const sc, dsm->name, dsm->revision, dsm_function_name(dsm, function_index)); } -static void acpi_spmc_check_dsm(struct acpi_spmc_softc *sc, +static void acpi_spmc_probe_dsm(struct acpi_spmc_softc *sc, ACPI_HANDLE handle, struct dsm_desc *const dsm); static void acpi_spmc_dsm_print_functions( const struct acpi_spmc_softc *const sc, @@ -380,7 +380,7 @@ acpi_spmc_attach(device_t dev) ("%s: Inconsistent indices for DSM %s", __func__, dsms[i]->name)); - acpi_spmc_check_dsm(sc, handle, dsms[i]); + acpi_spmc_probe_dsm(sc, handle, dsms[i]); } if (sc->dsms == 0) { @@ -391,6 +391,11 @@ acpi_spmc_attach(device_t dev) print_bit_field(buf, sizeof(buf), sc->dsms, "DSM", pbf_dsm_name, NULL); device_printf(dev, "DSMs supported: %s\n", buf); + /* Print supported functions of usable DSMs. */ + for (int i = 0; i < nitems(dsms); ++i) + if (has_dsm(sc, i)) + acpi_spmc_dsm_print_functions(sc, dsms[i]); + /* Get device constraints. We can only call this once so do this now. */ acpi_spmc_get_constraints(dev); @@ -447,7 +452,7 @@ acpi_spmc_dsm_print_functions(const struct acpi_spmc_softc *const sc, } static void -acpi_spmc_check_dsm(struct acpi_spmc_softc *sc, ACPI_HANDLE handle, +acpi_spmc_probe_dsm(struct acpi_spmc_softc *sc, ACPI_HANDLE handle, struct dsm_desc *const dsm) { const uint64_t supported_functions = acpi_DSMQuery(handle, @@ -460,7 +465,6 @@ acpi_spmc_check_dsm(struct acpi_spmc_softc *sc, ACPI_HANDLE handle, return; dsm->supported_functions = supported_functions & ~1; sc->dsms |= IDX_TO_BIT(dsm->index); - acpi_spmc_dsm_print_functions(sc, dsm); } static void