aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Certner <olce@FreeBSD.org>2026-05-07 16:15:21 +0000
committerOlivier Certner <olce@FreeBSD.org>2026-05-13 12:38:26 +0000
commit91d3fb31e858404f62d4a3afae2e209796968c3d (patch)
tree18b0af66646fabf39c05bff20b5752efc2287caf
parent69a303ace76f42630ca07bcc5d2d090774a0364d (diff)
acpi_spmc(4): If verbose, print called functions
...as a debugging aid, in order to be able to check that some functions are effectively called and to identify them quickly if they cause a hang. Reviewed by: obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56883
-rw-r--r--sys/dev/acpica/acpi_spmc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpi_spmc.c b/sys/dev/acpica/acpi_spmc.c
index fcd4105b2a76..8cb1d2878d88 100644
--- a/sys/dev/acpica/acpi_spmc.c
+++ b/sys/dev/acpica/acpi_spmc.c
@@ -763,7 +763,8 @@ acpi_spmc_get_constraints(struct acpi_spmc_softc *const sc)
if (ACPI_FAILURE(status)) {
failed_to_call_dsm(sc, dsm, DSM_GET_DEVICE_CONSTRAINTS);
return (ENXIO);
- }
+ } else if (VERBOSE())
+ device_printf(sc->dev, "Constraints: Retrieved successfully\n");
object = (ACPI_OBJECT *)result.Pointer;
if (dsm == &dsm_intel)
@@ -864,14 +865,21 @@ acpi_spmc_run(device_t dev, const struct dsm_desc *const dsm,
(force_call_expected_functions && has_dsm(sc, dsm->index))))
return;
+ if (VERBOSE())
+ device_printf(dev, "DSM %s: Calling function %s\n",
+ dsm->name, dsm_function_name(dsm, function_index));
status = acpi_EvaluateDSMTyped(sc->handle, (const uint8_t *)&dsm->uuid,
get_revision(sc, dsm->index), function_index, NULL,
&result, ACPI_TYPE_ANY);
if (ACPI_FAILURE(status))
failed_to_call_dsm(sc, dsm, function_index);
- else
+ else {
+ if (VERBOSE())
+ device_printf(dev, "DSM %s: Function %s successful\n",
+ dsm->name, dsm_function_name(dsm, function_index));
AcpiOsFree(result.Pointer);
+ }
}
/*