diff mbox series

[2/4] acpi: exsystem: Inform users about ACPI spec violation

Message ID 20220224113807.91771-2-pmenzel@molgen.mpg.de
State Accepted
Commit ace8f1c54a02b96036b50defa9d842c10292b6bb
Headers show
Series [1/4] acpi: exsystem: Add units to time variable names | expand

Commit Message

Paul Menzel Feb. 24, 2022, 11:38 a.m. UTC
Inform users if firmware violates the ACPI specification.

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
 drivers/acpi/acpica/exsystem.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

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);
 	}