diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-09 19:57:06 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-09 19:57:06 -0800 |
commit | 3067e02f8f3ae2f3f02ba76400d03b8bcb4942b0 (patch) | |
tree | 761e19d279b27a03714a6673811e76e0b1cf2081 /drivers/acpi/acpica/psloop.c | |
parent | f71eaf68406cfee91b6a96bcdf7ce33dc78829c5 (diff) | |
parent | b00eb796f1b67c46036b5490e83b31741f1eebaf (diff) | |
download | blackbird-obmc-linux-3067e02f8f3ae2f3f02ba76400d03b8bcb4942b0.tar.gz blackbird-obmc-linux-3067e02f8f3ae2f3f02ba76400d03b8bcb4942b0.zip |
Merge branch 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
ACPICA: Update version to 20091112.
ACPICA: Add additional module-level code support
ACPICA: Deploy new create integer interface where appropriate
ACPICA: New internal utility function to create Integer objects
ACPICA: Add repair for predefined methods that must return sorted lists
ACPICA: Fix possible fault if return Package objects contain NULL elements
ACPICA: Add post-order callback to acpi_walk_namespace
ACPICA: Change package length error message to an info message
ACPICA: Reduce severity of predefined repair messages, Warning to Info
ACPICA: Update version to 20091013
ACPICA: Fix possible memory leak for Scope ASL operator
ACPICA: Remove possibility of executing _REG methods twice
ACPICA: Add repair for bad _MAT buffers
ACPICA: Add repair for bad _BIF/_BIX packages
Diffstat (limited to 'drivers/acpi/acpica/psloop.c')
-rw-r--r-- | drivers/acpi/acpica/psloop.c | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/drivers/acpi/acpica/psloop.c b/drivers/acpi/acpica/psloop.c index cd7995b3aed4..0988e4a8901d 100644 --- a/drivers/acpi/acpica/psloop.c +++ b/drivers/acpi/acpica/psloop.c @@ -87,7 +87,8 @@ acpi_ps_complete_final_op(struct acpi_walk_state *walk_state, union acpi_parse_object *op, acpi_status status); static void -acpi_ps_link_module_code(u8 *aml_start, u32 aml_length, acpi_owner_id owner_id); +acpi_ps_link_module_code(union acpi_parse_object *parent_op, + u8 *aml_start, u32 aml_length, acpi_owner_id owner_id); /******************************************************************************* * @@ -479,11 +480,14 @@ acpi_ps_get_arguments(struct acpi_walk_state *walk_state, */ if (walk_state->pass_number == ACPI_IMODE_LOAD_PASS1) { - acpi_ps_link_module_code(aml_op_start, - walk_state-> + acpi_ps_link_module_code(op->common. + parent, + aml_op_start, + (u32) + (walk_state-> parser_state. pkg_end - - aml_op_start, + aml_op_start), walk_state-> owner_id); } @@ -598,7 +602,8 @@ acpi_ps_get_arguments(struct acpi_walk_state *walk_state, * * FUNCTION: acpi_ps_link_module_code * - * PARAMETERS: aml_start - Pointer to the AML + * PARAMETERS: parent_op - Parent parser op + * aml_start - Pointer to the AML * aml_length - Length of executable AML * owner_id - owner_id of module level code * @@ -611,11 +616,13 @@ acpi_ps_get_arguments(struct acpi_walk_state *walk_state, ******************************************************************************/ static void -acpi_ps_link_module_code(u8 *aml_start, u32 aml_length, acpi_owner_id owner_id) +acpi_ps_link_module_code(union acpi_parse_object *parent_op, + u8 *aml_start, u32 aml_length, acpi_owner_id owner_id) { union acpi_operand_object *prev; union acpi_operand_object *next; union acpi_operand_object *method_obj; + struct acpi_namespace_node *parent_node; /* Get the tail of the list */ @@ -639,11 +646,24 @@ acpi_ps_link_module_code(u8 *aml_start, u32 aml_length, acpi_owner_id owner_id) return; } + if (parent_op->common.node) { + parent_node = parent_op->common.node; + } else { + parent_node = acpi_gbl_root_node; + } + method_obj->method.aml_start = aml_start; method_obj->method.aml_length = aml_length; method_obj->method.owner_id = owner_id; method_obj->method.flags |= AOPOBJ_MODULE_LEVEL; + /* + * Save the parent node in next_object. This is cheating, but we + * don't want to expand the method object. + */ + method_obj->method.next_object = + ACPI_CAST_PTR(union acpi_operand_object, parent_node); + if (!prev) { acpi_gbl_module_code_list = method_obj; } else { |