summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/osl.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2014-03-24 02:49:00 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-03-26 11:25:59 -0400
commit22b5afce6a0f29f995b0cce83a5033892dd306d8 (patch)
tree5733ad0071177f398108a8932b7d7108bd74c4ca /drivers/acpi/osl.c
parente2b8ddcc6b3fbb860e15c5d52455735e128326aa (diff)
ACPICA: Add auto-serialization support for ill-behaved control methods.
This change adds support to automatically mark a control method as "serialized" if the method creates any named objects. This will positively prevent the method from being entered by more than one thread and thus preventing a possible abort when an attempt is made to create an object twice. Implemented by parsing all non-serialize control methods at table load time. This feature is disabled by default and this patch also adds a new Linux kernel parameter "acpi_auto_serialize" to allow this feature to be turned on for a specific boot. References: https://bugzilla.kernel.org/show_bug.cgi?id=52191 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r--drivers/acpi/osl.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index b7af3b758f32..74a160cf85b9 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1539,6 +1539,22 @@ static int __init osi_setup(char *str)
1539 1539
1540__setup("acpi_osi=", osi_setup); 1540__setup("acpi_osi=", osi_setup);
1541 1541
1542/*
1543 * Enable the auto-serialization of named objects creation methods.
1544 *
1545 * This feature is disabled by default. It marks the AML control methods
1546 * that contain the opcodes to create named objects as "Serialized".
1547 */
1548static int __init acpi_auto_serialize_setup(char *str)
1549{
1550 acpi_gbl_auto_serialize_methods = TRUE;
1551 pr_info("ACPI: auto-serialization enabled\n");
1552
1553 return 1;
1554}
1555
1556__setup("acpi_auto_serialize", acpi_auto_serialize_setup);
1557
1542/* Check of resource interference between native drivers and ACPI 1558/* Check of resource interference between native drivers and ACPI
1543 * OperationRegions (SystemIO and System Memory only). 1559 * OperationRegions (SystemIO and System Memory only).
1544 * IO ports and memory declared in ACPI might be used by the ACPI subsystem 1560 * IO ports and memory declared in ACPI might be used by the ACPI subsystem