diff options
author | Alexey Starikovskiy <astarikovskiy@suse.de> | 2010-05-26 09:59:51 +0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-07-07 06:33:57 +0400 |
commit | a9fc03125ea0001ff18bc29da9539b587fdbd1d7 (patch) | |
tree | 721b794d27aa84780c8e8f0e01d2119713b01ca7 /drivers/acpi/acpica/nsalloc.c | |
parent | 20d33aea7ae7ad858f3f91c834d9043cd8122d38 (diff) | |
download | linux-a9fc03125ea0001ff18bc29da9539b587fdbd1d7.tar.xz |
ACPICA: Optimization: Reduce the number of namespace walks
On control method exit, only walk the namespace if the method is
known to have created namespace objects outside of its local scope.
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
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 'drivers/acpi/acpica/nsalloc.c')
-rw-r--r-- | drivers/acpi/acpica/nsalloc.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/acpi/acpica/nsalloc.c b/drivers/acpi/acpica/nsalloc.c index 8d3a43a061ab..1e5ff803d9ad 100644 --- a/drivers/acpi/acpica/nsalloc.c +++ b/drivers/acpi/acpica/nsalloc.c @@ -219,12 +219,24 @@ void acpi_ns_install_node(struct acpi_walk_state *walk_state, struct acpi_namesp ACPI_FUNCTION_TRACE(ns_install_node); - /* - * Get the owner ID from the Walk state. The owner ID is used to track - * table deletion and deletion of objects created by methods. - */ if (walk_state) { + /* + * Get the owner ID from the Walk state. The owner ID is used to + * track table deletion and deletion of objects created by methods. + */ owner_id = walk_state->owner_id; + + if ((walk_state->method_desc) && + (parent_node != walk_state->method_node)) { + /* + * A method is creating a new node that is not a child of the + * method (it is non-local). Mark the executing method as having + * modified the namespace. This is used for cleanup when the + * method exits. + */ + walk_state->method_desc->method.flags |= + AOPOBJ_MODIFIED_NAMESPACE; + } } /* Link the new entry into the parent and existing children */ |