[PATCH 2/4] acpi: exsystem: Inform users about ACPI spec violation
From: Paul Menzel
Date: Thu Feb 24 2022 - 06:38:49 EST
Inform users if firmware violates the ACPI specification.
Signed-off-by: Paul Menzel <pmenzel@xxxxxxxxxxxxx>
---
drivers/acpi/acpica/exsystem.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/acpi/acpica/exsystem.c b/drivers/acpi/acpica/exsystem.c
index 6bc5b46e6927..00f66af31ffa 100644
--- a/drivers/acpi/acpica/exsystem.c
+++ b/drivers/acpi/acpica/exsystem.c
@@ -137,6 +137,9 @@ acpi_status acpi_ex_system_do_stall(u32 how_long_us)
"Time parameter is too large (%u)", how_long_us));
status = AE_AML_OPERAND_VALUE;
} else {
+ if (how_long_us > 100) /* 100 microseconds */
+ ACPI_WARNING((AE_INFO,
+ "Time parameter %u us > 100 us violating ACPI spec, please fix the firmware.", how_long_us));
acpi_os_stall(how_long_us);
}
--
2.35.1