diff options
author | Bob Moore <robert.moore@intel.com> | 2008-09-26 22:40:39 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-10-22 23:14:44 -0400 |
commit | 57e664cfd968ec8e4b0bfd80a5e8f903307e598b (patch) | |
tree | 1a4ab73f5a9f3a0e07ba2801494379373a461b66 /drivers/acpi | |
parent | 93851b4d13de48753eaae76ed190eef7355e2c19 (diff) |
ACPICA: Update for Reference ACPI_OPERAND_OBJECT
1) Add new field for use by DdbHandle (Value)
2) Use ACPI_CAST_INDIRECT_PTR to eliminate strict type warnings
3) Cleanup debug output
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')
-rw-r--r-- | drivers/acpi/dispatcher/dsobject.c | 16 | ||||
-rw-r--r-- | drivers/acpi/executer/exconfig.c | 6 | ||||
-rw-r--r-- | drivers/acpi/executer/exdump.c | 29 | ||||
-rw-r--r-- | drivers/acpi/executer/exstore.c | 4 |
4 files changed, 29 insertions, 26 deletions
diff --git a/drivers/acpi/dispatcher/dsobject.c b/drivers/acpi/dispatcher/dsobject.c index 0f2805899210..09af39fff1a3 100644 --- a/drivers/acpi/dispatcher/dsobject.c +++ b/drivers/acpi/dispatcher/dsobject.c | |||
@@ -741,10 +741,12 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state, | |||
741 | obj_desc-> | 741 | obj_desc-> |
742 | reference.offset, | 742 | reference.offset, |
743 | walk_state, | 743 | walk_state, |
744 | ACPI_CAST_INDIRECT_PTR | ||
744 | (struct | 745 | (struct |
745 | acpi_namespace_node | 746 | acpi_namespace_node, |
746 | **)&obj_desc-> | 747 | &obj_desc-> |
747 | reference.object); | 748 | reference. |
749 | object)); | ||
748 | #endif | 750 | #endif |
749 | break; | 751 | break; |
750 | 752 | ||
@@ -760,10 +762,12 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state, | |||
760 | obj_desc-> | 762 | obj_desc-> |
761 | reference.offset, | 763 | reference.offset, |
762 | walk_state, | 764 | walk_state, |
765 | ACPI_CAST_INDIRECT_PTR | ||
763 | (struct | 766 | (struct |
764 | acpi_namespace_node | 767 | acpi_namespace_node, |
765 | **)&obj_desc-> | 768 | &obj_desc-> |
766 | reference.object); | 769 | reference. |
770 | object)); | ||
767 | #endif | 771 | #endif |
768 | break; | 772 | break; |
769 | 773 | ||
diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c index 4c512c2990e5..5f2b1ebf70a3 100644 --- a/drivers/acpi/executer/exconfig.c +++ b/drivers/acpi/executer/exconfig.c | |||
@@ -96,7 +96,7 @@ acpi_ex_add_table(u32 table_index, | |||
96 | 96 | ||
97 | /* Install the new table into the local data structures */ | 97 | /* Install the new table into the local data structures */ |
98 | 98 | ||
99 | obj_desc->reference.object = ACPI_TO_POINTER(table_index); | 99 | obj_desc->reference.value = table_index; |
100 | 100 | ||
101 | /* Add the table to the namespace */ | 101 | /* Add the table to the namespace */ |
102 | 102 | ||
@@ -505,9 +505,9 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle) | |||
505 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 505 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
506 | } | 506 | } |
507 | 507 | ||
508 | /* Get the table index from the ddb_handle (acpi_size for 64-bit case) */ | 508 | /* Get the table index from the ddb_handle */ |
509 | 509 | ||
510 | table_index = (u32) (acpi_size) table_desc->reference.object; | 510 | table_index = table_desc->reference.value; |
511 | 511 | ||
512 | /* Invoke table handler if present */ | 512 | /* Invoke table handler if present */ |
513 | 513 | ||
diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c index 2be2e2bf95bf..7d4123256cf1 100644 --- a/drivers/acpi/executer/exdump.c +++ b/drivers/acpi/executer/exdump.c | |||
@@ -214,10 +214,11 @@ static struct acpi_exdump_info acpi_ex_dump_index_field[5] = { | |||
214 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(index_field.data_obj), "Data Object"} | 214 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(index_field.data_obj), "Data Object"} |
215 | }; | 215 | }; |
216 | 216 | ||
217 | static struct acpi_exdump_info acpi_ex_dump_reference[7] = { | 217 | static struct acpi_exdump_info acpi_ex_dump_reference[8] = { |
218 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_reference), NULL}, | 218 | {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_reference), NULL}, |
219 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(reference.target_type), "Target Type"}, | 219 | {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(reference.target_type), "Target Type"}, |
220 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(reference.offset), "Offset"}, | 220 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(reference.offset), "Offset"}, |
221 | {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(reference.value), "Value"}, | ||
221 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.object), "Object Desc"}, | 222 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.object), "Object Desc"}, |
222 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.node), "Node"}, | 223 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.node), "Node"}, |
223 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.where), "Where"}, | 224 | {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.where), "Where"}, |
@@ -497,24 +498,24 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
497 | switch (obj_desc->reference.opcode) { | 498 | switch (obj_desc->reference.opcode) { |
498 | case AML_DEBUG_OP: | 499 | case AML_DEBUG_OP: |
499 | 500 | ||
500 | acpi_os_printf("Reference: Debug\n"); | 501 | acpi_os_printf("Reference: [Debug]\n"); |
501 | break; | 502 | break; |
502 | 503 | ||
503 | case AML_INDEX_OP: | 504 | case AML_INDEX_OP: |
504 | 505 | ||
505 | acpi_os_printf("Reference: Index %p\n", | 506 | acpi_os_printf("Reference: [Index] %p\n", |
506 | obj_desc->reference.object); | 507 | obj_desc->reference.object); |
507 | break; | 508 | break; |
508 | 509 | ||
509 | case AML_LOAD_OP: | 510 | case AML_LOAD_OP: |
510 | 511 | ||
511 | acpi_os_printf("Reference: [DdbHandle] TableIndex %p\n", | 512 | acpi_os_printf("Reference: [DdbHandle] TableIndex %X\n", |
512 | obj_desc->reference.object); | 513 | obj_desc->reference.value); |
513 | break; | 514 | break; |
514 | 515 | ||
515 | case AML_REF_OF_OP: | 516 | case AML_REF_OF_OP: |
516 | 517 | ||
517 | acpi_os_printf("Reference: (RefOf) %p [%s]\n", | 518 | acpi_os_printf("Reference: [RefOf] %p [%s]\n", |
518 | obj_desc->reference.object, | 519 | obj_desc->reference.object, |
519 | acpi_ut_get_type_name(((union | 520 | acpi_ut_get_type_name(((union |
520 | acpi_operand_object | 521 | acpi_operand_object |
@@ -526,7 +527,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
526 | 527 | ||
527 | case AML_ARG_OP: | 528 | case AML_ARG_OP: |
528 | 529 | ||
529 | acpi_os_printf("Reference: Arg%d", | 530 | acpi_os_printf("Reference: [Arg%d]", |
530 | obj_desc->reference.offset); | 531 | obj_desc->reference.offset); |
531 | 532 | ||
532 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { | 533 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { |
@@ -544,7 +545,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
544 | 545 | ||
545 | case AML_LOCAL_OP: | 546 | case AML_LOCAL_OP: |
546 | 547 | ||
547 | acpi_os_printf("Reference: Local%d", | 548 | acpi_os_printf("Reference: [Local%d]", |
548 | obj_desc->reference.offset); | 549 | obj_desc->reference.offset); |
549 | 550 | ||
550 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { | 551 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { |
@@ -562,7 +563,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
562 | 563 | ||
563 | case AML_INT_NAMEPATH_OP: | 564 | case AML_INT_NAMEPATH_OP: |
564 | 565 | ||
565 | acpi_os_printf("Reference: Namepath %X [%4.4s]\n", | 566 | acpi_os_printf("Reference: [Namepath] %X [%4.4s]\n", |
566 | obj_desc->reference.node->name.integer, | 567 | obj_desc->reference.node->name.integer, |
567 | obj_desc->reference.node->name.ascii); | 568 | obj_desc->reference.node->name.ascii); |
568 | break; | 569 | break; |
@@ -883,13 +884,11 @@ static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc) | |||
883 | acpi_os_printf(" Target: %p", | 884 | acpi_os_printf(" Target: %p", |
884 | obj_desc->reference.object); | 885 | obj_desc->reference.object); |
885 | if (obj_desc->reference.opcode == AML_LOAD_OP) { | 886 | if (obj_desc->reference.opcode == AML_LOAD_OP) { |
886 | /* | 887 | acpi_os_printf(" [DDBHandle] Table Index: %X\n", |
887 | * For DDBHandle reference, | 888 | obj_desc->reference.value); |
888 | * obj_desc->Reference.Object is the table index | ||
889 | */ | ||
890 | acpi_os_printf(" [DDBHandle]\n"); | ||
891 | } else { | 889 | } else { |
892 | acpi_os_printf(" [%s]\n", | 890 | acpi_os_printf(" Target: %p [%s]\n", |
891 | obj_desc->reference.object, | ||
893 | acpi_ut_get_type_name(((union | 892 | acpi_ut_get_type_name(((union |
894 | acpi_operand_object | 893 | acpi_operand_object |
895 | *) | 894 | *) |
diff --git a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c index 09e96846d155..20b4893e06ed 100644 --- a/drivers/acpi/executer/exstore.c +++ b/drivers/acpi/executer/exstore.c | |||
@@ -193,8 +193,8 @@ acpi_ex_do_debug_object(union acpi_operand_object *source_desc, | |||
193 | 193 | ||
194 | if (source_desc->reference.opcode == AML_LOAD_OP) { /* Load and load_table */ | 194 | if (source_desc->reference.opcode == AML_LOAD_OP) { /* Load and load_table */ |
195 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, | 195 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, |
196 | " Table OwnerId %p\n", | 196 | " Table Index %X\n", |
197 | source_desc->reference.object)); | 197 | source_desc->reference.value)); |
198 | break; | 198 | break; |
199 | } | 199 | } |
200 | 200 | ||