summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorPaul Menzel <pmenzel@molgen.mpg.de>2022-04-11 21:59:51 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-04-13 21:24:58 +0300
commit6eaf08770ee8562ea497c8b3f1c0079832953e20 (patch)
treea7feb2691809f01a1e1595d4e8026c91e3683ed0 /drivers/acpi
parentace8f1c54a02b96036b50defa9d842c10292b6bb (diff)
downloadlinux-6eaf08770ee8562ea497c8b3f1c0079832953e20.tar.xz
ACPICA: executer/exsystem: Warn about sleeps greater than 10 ms
ACPICA commit 2a0d1d475e7ea1c815bee1e0692d81db9a7c909c Quick boottime is important, so warn about sleeps greater than 10 ms. Distribution Linux kernels reach initrd in 350 ms, so excessive delays should be called out. 10 ms is chosen randomly, but three of such delays would already make up ten percent of the boottime. Link: https://github.com/acpica/acpica/commit/2a0d1d47 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reported-by: kernel test robot <lkp@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/acpica/exsystem.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/exsystem.c b/drivers/acpi/acpica/exsystem.c
index 754cf289fc01..b9b98a7cad4d 100644
--- a/drivers/acpi/acpica/exsystem.c
+++ b/drivers/acpi/acpica/exsystem.c
@@ -170,6 +170,16 @@ acpi_status acpi_ex_system_do_sleep(u64 how_long_ms)
acpi_ex_exit_interpreter();
/*
+ * Warn users about excessive sleep times, so ASL code can be improved to
+ * use polling or similar techniques.
+ */
+ if (how_long_ms > 10) {
+ ACPI_WARNING((AE_INFO,
+ "Firmware issue: Excessive sleep time (%llu ms > 10 ms) in ACPI Control Method",
+ how_long_us));
+ }
+
+ /*
* For compatibility with other ACPI implementations and to prevent
* accidental deep sleeps, limit the sleep time to something reasonable.
*/