[PATCH v13 07/12] ACPI: x86: s2idle: Add more debugging for AMD constraints parsing

From: Mario Limonciello
Date: Fri Aug 18 2023 - 01:17:54 EST


While parsing the constraints show all the entries for the table
to aid with debugging other problems later.

Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
---
v12->v13:
* move location of the message to catch non-enabled constraints too
v9->v10:
* split from other patches
---
drivers/acpi/x86/s2idle.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c
index 60835953ebfc4..87563337a4786 100644
--- a/drivers/acpi/x86/s2idle.c
+++ b/drivers/acpi/x86/s2idle.c
@@ -156,6 +156,13 @@ static void lpi_device_get_constraints_amd(void)
}
}

+ acpi_handle_debug(lps0_device_handle,
+ "Name:%s, Enabled: %d, States: %d, MinDstate: %d\n",
+ dev_info.name,
+ dev_info.enabled,
+ dev_info.function_states,
+ dev_info.min_dstate);
+
if (!dev_info.enabled || !dev_info.name ||
!dev_info.min_dstate)
continue;
@@ -164,9 +171,6 @@ static void lpi_device_get_constraints_amd(void)
if (ACPI_FAILURE(status))
continue;

- acpi_handle_debug(lps0_device_handle,
- "Name:%s\n", dev_info.name);
-
list->min_dstate = dev_info.min_dstate;

lpi_constraints_table_size++;
--
2.34.1