aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer/exresolv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/executer/exresolv.c')
-rw-r--r--drivers/acpi/executer/exresolv.c43
1 files changed, 9 insertions, 34 deletions
diff --git a/drivers/acpi/executer/exresolv.c b/drivers/acpi/executer/exresolv.c
index 1deed492fe88..22dabdd10604 100644
--- a/drivers/acpi/executer/exresolv.c
+++ b/drivers/acpi/executer/exresolv.c
@@ -382,10 +382,16 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state,
382 while (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_LOCAL_REFERENCE) { 382 while (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_LOCAL_REFERENCE) {
383 switch (obj_desc->reference.opcode) { 383 switch (obj_desc->reference.opcode) {
384 case AML_REF_OF_OP: 384 case AML_REF_OF_OP:
385 case AML_INT_NAMEPATH_OP:
385 386
386 /* Dereference the reference pointer */ 387 /* Dereference the reference pointer */
387 388
388 node = obj_desc->reference.object; 389 if (obj_desc->reference.opcode == AML_REF_OF_OP) {
390 node = obj_desc->reference.object;
391 } else { /* AML_INT_NAMEPATH_OP */
392
393 node = obj_desc->reference.node;
394 }
389 395
390 /* All "References" point to a NS node */ 396 /* All "References" point to a NS node */
391 397
@@ -401,6 +407,7 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state,
401 407
402 obj_desc = acpi_ns_get_attached_object(node); 408 obj_desc = acpi_ns_get_attached_object(node);
403 if (!obj_desc) { 409 if (!obj_desc) {
410
404 /* No object, use the NS node type */ 411 /* No object, use the NS node type */
405 412
406 type = acpi_ns_get_type(node); 413 type = acpi_ns_get_type(node);
@@ -432,6 +439,7 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state,
432 */ 439 */
433 obj_desc = *(obj_desc->reference.where); 440 obj_desc = *(obj_desc->reference.where);
434 if (!obj_desc) { 441 if (!obj_desc) {
442
435 /* NULL package elements are allowed */ 443 /* NULL package elements are allowed */
436 444
437 type = 0; /* Uninitialized */ 445 type = 0; /* Uninitialized */
@@ -439,39 +447,6 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state,
439 } 447 }
440 break; 448 break;
441 449
442 case AML_INT_NAMEPATH_OP:
443
444 /* Dereference the reference pointer */
445
446 node = obj_desc->reference.node;
447
448 /* All "References" point to a NS node */
449
450 if (ACPI_GET_DESCRIPTOR_TYPE(node) !=
451 ACPI_DESC_TYPE_NAMED) {
452 ACPI_ERROR((AE_INFO, "Not a NS node %p [%s]",
453 node,
454 acpi_ut_get_descriptor_name(node)));
455 return_ACPI_STATUS(AE_AML_INTERNAL);
456 }
457
458 /* Get the attached object */
459
460 obj_desc = acpi_ns_get_attached_object(node);
461 if (!obj_desc) {
462 /* No object, use the NS node type */
463
464 type = acpi_ns_get_type(node);
465 goto exit;
466 }
467
468 /* Check for circular references */
469
470 if (obj_desc == operand) {
471 return_ACPI_STATUS(AE_AML_CIRCULAR_REFERENCE);
472 }
473 break;
474
475 case AML_LOCAL_OP: 450 case AML_LOCAL_OP:
476 case AML_ARG_OP: 451 case AML_ARG_OP:
477 452