summaryrefslogtreecommitdiffstats
path: root/include/acpi/acconfig.h
diff options
context:
space:
mode:
authorBob Moore2008-11-12 08:15:29 +0100
committerLen Brown2008-12-30 04:38:36 +0100
commitfc37445733aeae4fd1a20385850620354263b1d5 (patch)
treea989d6bf8dcc2011f25e365532c3855a48f11c62 /include/acpi/acconfig.h
parentACPICA: Optimize execution of AML While loops (diff)
downloadkernel-qcow2-linux-fc37445733aeae4fd1a20385850620354263b1d5.tar.gz
kernel-qcow2-linux-fc37445733aeae4fd1a20385850620354263b1d5.tar.xz
kernel-qcow2-linux-fc37445733aeae4fd1a20385850620354263b1d5.zip
ACPICA: Add a mechanism to escape infinite AML While() loops
Add a loop counter to force exit from AML While loops if the count becomes too large. This can occur in poorly written AML when the hardware does not respond within a while loop and the loop does not implement a timeout. The maximum loop count is configurable. A new exception code is returned when a loop is broken, AE_AML_INFINITE_LOOP. Bob Moore, Alexey Starikovskiy. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi/acconfig.h')
-rw-r--r--include/acpi/acconfig.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 29feee27f0ea..e50fe7157463 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -119,6 +119,10 @@
#define ACPI_ROOT_TABLE_SIZE_INCREMENT 4
+/* Maximum number of While() loop iterations before forced abort */
+
+#define ACPI_MAX_LOOP_ITERATIONS 0xFFFF
+
/******************************************************************************
*
* ACPI Specification constants (Do not change unless the specification changes)