From nobody Wed May 13 12:40:04 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 4gFtMn29pHz6dLMc for ; Wed, 13 May 2026 12:40:05 +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 4gFtMm6wWJz3wMP for ; Wed, 13 May 2026 12:40:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1778676005; 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=1EYw45XSfUpQuHeOQoz/NXQRHmANtRO70zB0QTrllYw=; b=NxR0T9Qfwtx/ClRYRFdcwc34S3l4BClti7ZOy8ox46lEMmnQs/hoS9KGgsHVkzF3gG/qmU oNxN3ztWHoQ+C8Zs7jf8ZfBF57bbSRAjB/A5FaALYQlFLNRsHe3EMCTTqKIgkpPYHTpH+V 3l2oC5HOq9d6bKBjCUVP2peE63bLV8CKOvb2XNMoFPP8nN3nSZQnd2rr5k/iiIih+EyPbj wO5rrs8IwfZEwQ2gOBkWzjvwXU+HSmdlrtN24zeBjgru/f3NqV71tloGKy80L7xMM9K1xU JWpnx1Nf0v8+0f1R2eG2y+/hCSLdXzFpUMLBW6z1ZRMIpUg4IT0fNhYlSmBtJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1778676005; a=rsa-sha256; cv=none; b=L2gcGXRfs/NvyK3d9XfAxjUXc+6GXOlWSjgxgB66MEsJspsLoZMCZNIFQdgIOjqc97rY9I hYqYldkHr3ZXJOyXxE1VREIeVP+nQDCHX0kw71sscCodSWyLNlV+vsdJDKoulHe00EEgtg 5hCoMjZMcR4KblHbm62ZhxnfIJl0mgFQl9ACjX5rrwmds7UIu01xxBQi7cVDuzM0h6j33U ivEFnL0h/WGRsEnBKCvgJWfZLPF8wzhu/zunoJuh1MT2iz+Athw6F7HuzAfC6xgkyKgniN 0IJO6SpFz9G9rBk42flzSHUHL0y5OSkAAx5y+GJp8/p8x0P7oHzTZoDhKt+PtQ== 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=1778676005; 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=1EYw45XSfUpQuHeOQoz/NXQRHmANtRO70zB0QTrllYw=; b=bilNPoApA8nIojZF3zdv7P3iGUznLlwrQm+8GrgnurOx0n0/On3KW4U3vqOXnGDViuM8NE TWb3RyylVVXL+0HhBSnffrz+MRxhP5wAyLceqdhuhEcQcqs2TiC4F8WkhfoY0A20kdfvQn bC/ARF5p/5ZvJAjhteQ+PH69W0lsL3zewuT+9WySZNDXrbue47WBYW9iROOEx0I2H/GY5g GSkzqfLmZwXVvMSZpgS+Y5LXkailTCaAgMyUkYvtbzygiDZvrn44ZwgAdwIiAVlpfzf0f1 aNUND4FeTzMOTsvc7MUPjG6Td6gKtI541wFSzdD9AC9CV0pDTjYlBpXXpZY5Lw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gFtMm6LT9zqm1 for ; Wed, 13 May 2026 12:40:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c893 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 13 May 2026 12:40:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: b092ee520618 - main - acpi_spmc(4): softc: Move supported functions into a DSM info structure 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: b092ee520618a8e8df7f4d7fb095e8940dd0d305 Auto-Submitted: auto-generated Date: Wed, 13 May 2026 12:40:04 +0000 Message-Id: <6a047124.1c893.3b4c14cf@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=b092ee520618a8e8df7f4d7fb095e8940dd0d305 commit b092ee520618a8e8df7f4d7fb095e8940dd0d305 Author: Olivier Certner AuthorDate: 2026-05-06 13:15:27 +0000 Commit: Olivier Certner CommitDate: 2026-05-13 12:38:25 +0000 acpi_spmc(4): softc: Move supported functions into a DSM info structure This is in preparation to adding the revision as a probed information. Reviewed by: obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56880 --- sys/dev/acpica/acpi_spmc.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sys/dev/acpica/acpi_spmc.c b/sys/dev/acpica/acpi_spmc.c index c33336d10ec3..244e7795ba84 100644 --- a/sys/dev/acpica/acpi_spmc.c +++ b/sys/dev/acpica/acpi_spmc.c @@ -211,6 +211,11 @@ SYSCTL_BOOL(_debug_acpi_spmc, OID_AUTO, always_call_expected_functions, CTLFLAG_RW, &force_call_expected_functions, 0, "Call all expected functions on a present DSM, even those not enumerated."); +/* Per DSM probed information. */ +struct dsm_info { + uint64_t supported_functions; +}; + struct acpi_spmc_constraint { bool enabled; char *name; @@ -228,7 +233,7 @@ struct acpi_spmc_constraint { struct acpi_spmc_softc { device_t dev; ACPI_HANDLE handle; - uint64_t supported_functions[nitems(dsms)]; + struct dsm_info dsms_info[nitems(dsms)]; struct eventhandler_entry *eh_suspend; struct eventhandler_entry *eh_resume; @@ -252,9 +257,9 @@ static bool supports_function(const struct acpi_spmc_softc *const sc, const int dsm_index, const int function_index) { - MPASS(0 <= dsm_index && dsm_index < nitems(sc->supported_functions)); + MPASS(0 <= dsm_index && dsm_index < nitems(dsms)); - return ((sc->supported_functions[dsm_index] & + return ((sc->dsms_info[dsm_index].supported_functions & IDX_TO_BIT(function_index)) != 0); } @@ -451,7 +456,7 @@ acpi_spmc_dsm_print_functions(const struct acpi_spmc_softc *const sc, * report as unknown. */ const uint64_t supported_functions = ~IDX_TO_BIT(DSM_ENUM_FUNCTIONS) & - sc->supported_functions[dsm->index]; + sc->dsms_info[dsm->index].supported_functions; const uint64_t missing = dsm->expected_functions & ~supported_functions; const uint64_t unknown = supported_functions & ~(dsm->expected_functions | dsm->extra_functions); @@ -491,7 +496,7 @@ acpi_spmc_probe_dsm(struct acpi_spmc_softc *const sc, */ if ((supported_functions & IDX_TO_BIT(DSM_ENUM_FUNCTIONS)) == 0) return; - sc->supported_functions[dsm->index] = supported_functions; + sc->dsms_info[dsm->index].supported_functions = supported_functions; } static void