Commit 8ea98655 authored by Bob Moore's avatar Bob Moore Committed by Rafael J. Wysocki

ACPICA: Namespace: Change namespace override to avoid node deletion

ACPICA commit c0ce529e1fbb8ec47d2522a3aa10f3ab77e16e41

There is no reference counting implemented for struct acpi_namespace_node, so it
is currently not removable during runtime.
This patch changes the namespace override code to keep the old
struct acpi_namespace_node undeleted so that the override mechanism can happen
during runtime. Bob Moore.

Link: https://github.com/acpica/acpica/commit/c0ce529eSigned-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent fe536995
...@@ -331,13 +331,28 @@ acpi_ns_search_and_enter(u32 target_name, ...@@ -331,13 +331,28 @@ acpi_ns_search_and_enter(u32 target_name,
/* /*
* If the namespace override feature is enabled for this node, * If the namespace override feature is enabled for this node,
* delete any existing node. This can only happen during the * delete any existing attached sub-object and make the node
* boot stage, thus it is safe to remove the node here. * look like a new node that is owned by the override table.
*/ */
if (flags & ACPI_NS_OVERRIDE_IF_FOUND) { if (flags & ACPI_NS_OVERRIDE_IF_FOUND) {
ACPI_DEBUG_PRINT((ACPI_DB_NAMES,
"Namespace override: %4.4s pass %u type %X Owner %X\n",
ACPI_CAST_PTR(char,
&target_name),
interpreter_mode,
(*return_node)->type,
walk_state->owner_id));
acpi_ns_delete_children(*return_node); acpi_ns_delete_children(*return_node);
acpi_ns_remove_node(*return_node); if (acpi_gbl_runtime_namespace_override) {
*return_node = ACPI_ENTRY_NOT_FOUND; acpi_ut_remove_reference((*return_node)->object);
(*return_node)->object = NULL;
(*return_node)->owner_id =
walk_state->owner_id;
} else {
acpi_ns_remove_node(*return_node);
*return_node = ACPI_ENTRY_NOT_FOUND;
}
} }
/* Return an error if we don't expect to find the object */ /* Return an error if we don't expect to find the object */
......
...@@ -228,6 +228,11 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_auto_repair, FALSE); ...@@ -228,6 +228,11 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_auto_repair, FALSE);
*/ */
ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_ssdt_table_install, FALSE); ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_ssdt_table_install, FALSE);
/*
* Optionally enable runtime namespace override.
*/
ACPI_INIT_GLOBAL(u8, acpi_gbl_runtime_namespace_override, TRUE);
/* /*
* We keep track of the latest version of Windows that has been requested by * We keep track of the latest version of Windows that has been requested by
* the BIOS. ACPI 5.0. * the BIOS. ACPI 5.0.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment