summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica/nsaccess.c
diff options
context:
space:
mode:
authorErik Schmauss <erik.schmauss@intel.com>2018-08-10 14:43:00 -0700
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-08-14 23:49:13 +0200
commit77d4e0966a8a6f8a3aa9d27b067a1fc0ec10628d (patch)
tree37d09062dc984732812fadc92ad76129be3c2c9b /drivers/acpi/acpica/nsaccess.c
parentfb2ef998af44fb94214f3cf1c0e85d7a4e642fcb (diff)
ACPICA: acpi_exec: fixing -fi option
Field elements listed in the init file used to be initialized after the table load and before executing module-level code blocks. The recent changes in module-level code mean that the table load becomes a method execution. If fields are used within module-level code and we are executing with -fi option, then these values are populated after the table has finished loading. This commit changes the initialization of objects listed in the init file so that field unit values are populated during the table load. Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/nsaccess.c')
-rw-r--r--drivers/acpi/acpica/nsaccess.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/nsaccess.c b/drivers/acpi/acpica/nsaccess.c
index 83a593e2155d..e3f10afde5ff 100644
--- a/drivers/acpi/acpica/nsaccess.c
+++ b/drivers/acpi/acpica/nsaccess.c
@@ -558,6 +558,14 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
(char *)&current_node->name,
current_node));
}
+#ifdef ACPI_EXEC_APP
+ if ((status == AE_ALREADY_EXISTS) &&
+ (this_node->flags & ANOBJ_NODE_EARLY_INIT)) {
+ this_node->flags &= ~ANOBJ_NODE_EARLY_INIT;
+ status = AE_OK;
+ }
+#endif
+
#ifdef ACPI_ASL_COMPILER
/*
* If this ACPI name already exists within the namespace as an
@@ -676,6 +684,11 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
}
}
}
+#ifdef ACPI_EXEC_APP
+ if (flags & ACPI_NS_EARLY_INIT) {
+ this_node->flags |= ANOBJ_NODE_EARLY_INIT;
+ }
+#endif
*return_node = this_node;
return_ACPI_STATUS(AE_OK);