summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica/dsmethod.c
diff options
context:
space:
mode:
authorDavid E. Box <david.e.box@linux.intel.com>2015-12-29 08:53:57 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-01-01 05:26:45 +0300
commit33d3a2abbd7afd51d8dcf1e35756e13e6b89f2cb (patch)
treea87138471d5fa8ff0c1e4c721efb02fc93f34893 /drivers/acpi/acpica/dsmethod.c
parent0e166e4f67f544370328bf879694f7ed116c2563 (diff)
downloadlinux-33d3a2abbd7afd51d8dcf1e35756e13e6b89f2cb.tar.xz
ACPICA: Fix SyncLevel support interaction with method auto-serialization
ACPICA commit 253e3c03efc1a495d2aa61eee09ab1d0842a3dce The control method auto-serialization can interfere with existing ASL code that makes use of Mutex/Method SyncLevel support. This change makes the auto-serialization transparent to the SyncLevel support and management. David Box. Link: https://github.com/acpica/acpica/commit/253e3c03 Signed-off-by: David E. Box <david.e.box@linux.intel.com> 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/acpica/dsmethod.c')
-rw-r--r--drivers/acpi/acpica/dsmethod.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c
index bc32f3194afe..49ba082ad379 100644
--- a/drivers/acpi/acpica/dsmethod.c
+++ b/drivers/acpi/acpica/dsmethod.c
@@ -411,8 +411,19 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node,
obj_desc->method.mutex->mutex.thread_id =
walk_state->thread->thread_id;
- walk_state->thread->current_sync_level =
- obj_desc->method.sync_level;
+
+ /*
+ * Update the current sync_level only if this is not an auto-
+ * serialized method. In the auto case, we have to ignore
+ * the sync level for the method mutex (created for the
+ * auto-serialization) because we have no idea of what the
+ * sync level should be. Therefore, just ignore it.
+ */
+ if (!(obj_desc->method.info_flags &
+ ACPI_METHOD_IGNORE_SYNC_LEVEL)) {
+ walk_state->thread->current_sync_level =
+ obj_desc->method.sync_level;
+ }
} else {
obj_desc->method.mutex->mutex.
original_sync_level =