diff options
author | Lin Ming <ming.m.lin@intel.com> | 2008-04-10 11:06:42 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-04-22 14:29:30 -0400 |
commit | bc7a36ab74e09da7bb63e2477b0740ac992b290e (patch) | |
tree | f9384f3f0909e1da6f12fb55643de8de594551dd /drivers/acpi/parser | |
parent | a6f4a4511e65942b93ded60d746094ec0e58ed8e (diff) |
ACPICA: Fixes for Unload and DDBHandles
Implemented support for the use of DDBHandles as an Indexed
Reference, as per the ACPI spec.
http://www.acpica.org/bugzilla/show_bug.cgi?id=486.
Implemented support for UserTerm (Method invocation) for the Unload operator
as per the ACPI spec.
http://www.acpica.org/bugzilla/show_bug.cgi?id=580
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/parser')
-rw-r--r-- | drivers/acpi/parser/psargs.c | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/drivers/acpi/parser/psargs.c b/drivers/acpi/parser/psargs.c index 442880f5600e..2a3a948dd114 100644 --- a/drivers/acpi/parser/psargs.c +++ b/drivers/acpi/parser/psargs.c | |||
@@ -235,6 +235,7 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state, | |||
235 | union acpi_parse_object *name_op; | 235 | union acpi_parse_object *name_op; |
236 | union acpi_operand_object *method_desc; | 236 | union acpi_operand_object *method_desc; |
237 | struct acpi_namespace_node *node; | 237 | struct acpi_namespace_node *node; |
238 | u8 *start = parser_state->aml; | ||
238 | 239 | ||
239 | ACPI_FUNCTION_TRACE(ps_get_next_namepath); | 240 | ACPI_FUNCTION_TRACE(ps_get_next_namepath); |
240 | 241 | ||
@@ -267,6 +268,16 @@ acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state, | |||
267 | */ | 268 | */ |
268 | if (ACPI_SUCCESS(status) && | 269 | if (ACPI_SUCCESS(status) && |
269 | possible_method_call && (node->type == ACPI_TYPE_METHOD)) { | 270 | possible_method_call && (node->type == ACPI_TYPE_METHOD)) { |
271 | if (walk_state->op->common.aml_opcode == AML_UNLOAD_OP) { | ||
272 | /* | ||
273 | * acpi_ps_get_next_namestring has increased the AML pointer, | ||
274 | * so we need to restore the saved AML pointer for method call. | ||
275 | */ | ||
276 | walk_state->parser_state.aml = start; | ||
277 | walk_state->arg_count = 1; | ||
278 | acpi_ps_init_op(arg, AML_INT_METHODCALL_OP); | ||
279 | return_ACPI_STATUS(AE_OK); | ||
280 | } | ||
270 | 281 | ||
271 | /* This name is actually a control method invocation */ | 282 | /* This name is actually a control method invocation */ |
272 | 283 | ||
@@ -678,9 +689,29 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state, | |||
678 | return_ACPI_STATUS(AE_NO_MEMORY); | 689 | return_ACPI_STATUS(AE_NO_MEMORY); |
679 | } | 690 | } |
680 | 691 | ||
681 | status = | 692 | /* To support super_name arg of Unload */ |
682 | acpi_ps_get_next_namepath(walk_state, parser_state, | 693 | |
683 | arg, 0); | 694 | if (walk_state->op->common.aml_opcode == AML_UNLOAD_OP) { |
695 | status = | ||
696 | acpi_ps_get_next_namepath(walk_state, | ||
697 | parser_state, arg, | ||
698 | 1); | ||
699 | |||
700 | /* | ||
701 | * If the super_name arg of Unload is a method call, | ||
702 | * we have restored the AML pointer, just free this Arg | ||
703 | */ | ||
704 | if (arg->common.aml_opcode == | ||
705 | AML_INT_METHODCALL_OP) { | ||
706 | acpi_ps_free_op(arg); | ||
707 | arg = NULL; | ||
708 | } | ||
709 | } else { | ||
710 | status = | ||
711 | acpi_ps_get_next_namepath(walk_state, | ||
712 | parser_state, arg, | ||
713 | 0); | ||
714 | } | ||
684 | } else { | 715 | } else { |
685 | /* Single complex argument, nothing returned */ | 716 | /* Single complex argument, nothing returned */ |
686 | 717 | ||