aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Certner <olce@FreeBSD.org>2026-05-04 16:19:31 +0000
committerOlivier Certner <olce@FreeBSD.org>2026-05-13 12:38:22 +0000
commitebad66abbc1f25a761add6481de99abf474b2d87 (patch)
tree4d9a82ea1fb302b3bb91bd85cf85ed23d2696aa2
parent6bd543f7a82a3cbb10db3a79590d5179be403660 (diff)
-rw-r--r--sys/dev/acpica/acpi_spmc.c12
1 files 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