aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/dispatcher/dsobject.c3
-rw-r--r--drivers/acpi/dispatcher/dswstate.c4
-rw-r--r--drivers/acpi/events/evgpeblk.c36
-rw-r--r--drivers/acpi/events/evrgnini.c10
-rw-r--r--drivers/acpi/events/evxfevnt.c6
-rw-r--r--drivers/acpi/executer/exdump.c14
-rw-r--r--drivers/acpi/executer/exstore.c4
-rw-r--r--drivers/acpi/executer/exstoren.c4
-rw-r--r--drivers/acpi/namespace/nsdump.c31
-rw-r--r--drivers/acpi/parser/psopcode.c2
-rw-r--r--drivers/acpi/resources/rsdump.c4
-rw-r--r--drivers/acpi/utilities/utcopy.c46
12 files changed, 80 insertions, 84 deletions
diff --git a/drivers/acpi/dispatcher/dsobject.c b/drivers/acpi/dispatcher/dsobject.c
index bfbae4e4c667..1eee2d54180f 100644
--- a/drivers/acpi/dispatcher/dsobject.c
+++ b/drivers/acpi/dispatcher/dsobject.c
@@ -547,6 +547,9 @@ acpi_ds_init_object_from_op (
547 case AML_TYPE_LITERAL: 547 case AML_TYPE_LITERAL:
548 548
549 obj_desc->integer.value = op->common.value.integer; 549 obj_desc->integer.value = op->common.value.integer;
550#ifndef ACPI_NO_METHOD_EXECUTION
551 acpi_ex_truncate_for32bit_table (obj_desc);
552#endif
550 break; 553 break;
551 554
552 555
diff --git a/drivers/acpi/dispatcher/dswstate.c b/drivers/acpi/dispatcher/dswstate.c
index 9cd3db652b31..4ef0e85c677b 100644
--- a/drivers/acpi/dispatcher/dswstate.c
+++ b/drivers/acpi/dispatcher/dswstate.c
@@ -261,12 +261,12 @@ acpi_ds_result_pop_from_bottom (
261 261
262 if (!*object) { 262 if (!*object) {
263 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, 263 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
264 "Null operand! State=%p #Ops=%X, Index=%X\n", 264 "Null operand! State=%p #Ops=%X Index=%X\n",
265 walk_state, state->results.num_results, (u32) index)); 265 walk_state, state->results.num_results, (u32) index));
266 return (AE_AML_NO_RETURN_VALUE); 266 return (AE_AML_NO_RETURN_VALUE);
267 } 267 }
268 268
269 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s], Results=%p State=%p\n", 269 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s] Results=%p State=%p\n",
270 *object, (*object) ? acpi_ut_get_object_type_name (*object) : "NULL", 270 *object, (*object) ? acpi_ut_get_object_type_name (*object) : "NULL",
271 state, walk_state)); 271 state, walk_state));
272 272
diff --git a/drivers/acpi/events/evgpeblk.c b/drivers/acpi/events/evgpeblk.c
index 84186a7d17b2..ee5419b8f1b1 100644
--- a/drivers/acpi/events/evgpeblk.c
+++ b/drivers/acpi/events/evgpeblk.c
@@ -66,7 +66,7 @@ acpi_ev_match_prw_and_gpe (
66 66
67static struct acpi_gpe_xrupt_info * 67static struct acpi_gpe_xrupt_info *
68acpi_ev_get_gpe_xrupt_block ( 68acpi_ev_get_gpe_xrupt_block (
69 u32 interrupt_level); 69 u32 interrupt_number);
70 70
71static acpi_status 71static acpi_status
72acpi_ev_delete_gpe_xrupt ( 72acpi_ev_delete_gpe_xrupt (
@@ -75,7 +75,7 @@ acpi_ev_delete_gpe_xrupt (
75static acpi_status 75static acpi_status
76acpi_ev_install_gpe_block ( 76acpi_ev_install_gpe_block (
77 struct acpi_gpe_block_info *gpe_block, 77 struct acpi_gpe_block_info *gpe_block,
78 u32 interrupt_level); 78 u32 interrupt_number);
79 79
80static acpi_status 80static acpi_status
81acpi_ev_create_gpe_info_blocks ( 81acpi_ev_create_gpe_info_blocks (
@@ -482,7 +482,7 @@ cleanup:
482 * 482 *
483 * FUNCTION: acpi_ev_get_gpe_xrupt_block 483 * FUNCTION: acpi_ev_get_gpe_xrupt_block
484 * 484 *
485 * PARAMETERS: interrupt_level - Interrupt for a GPE block 485 * PARAMETERS: interrupt_number - Interrupt for a GPE block
486 * 486 *
487 * RETURN: A GPE interrupt block 487 * RETURN: A GPE interrupt block
488 * 488 *
@@ -495,7 +495,7 @@ cleanup:
495 495
496static struct acpi_gpe_xrupt_info * 496static struct acpi_gpe_xrupt_info *
497acpi_ev_get_gpe_xrupt_block ( 497acpi_ev_get_gpe_xrupt_block (
498 u32 interrupt_level) 498 u32 interrupt_number)
499{ 499{
500 struct acpi_gpe_xrupt_info *next_gpe_xrupt; 500 struct acpi_gpe_xrupt_info *next_gpe_xrupt;
501 struct acpi_gpe_xrupt_info *gpe_xrupt; 501 struct acpi_gpe_xrupt_info *gpe_xrupt;
@@ -509,7 +509,7 @@ acpi_ev_get_gpe_xrupt_block (
509 509
510 next_gpe_xrupt = acpi_gbl_gpe_xrupt_list_head; 510 next_gpe_xrupt = acpi_gbl_gpe_xrupt_list_head;
511 while (next_gpe_xrupt) { 511 while (next_gpe_xrupt) {
512 if (next_gpe_xrupt->interrupt_level == interrupt_level) { 512 if (next_gpe_xrupt->interrupt_number == interrupt_number) {
513 return_PTR (next_gpe_xrupt); 513 return_PTR (next_gpe_xrupt);
514 } 514 }
515 515
@@ -523,7 +523,7 @@ acpi_ev_get_gpe_xrupt_block (
523 return_PTR (NULL); 523 return_PTR (NULL);
524 } 524 }
525 525
526 gpe_xrupt->interrupt_level = interrupt_level; 526 gpe_xrupt->interrupt_number = interrupt_number;
527 527
528 /* Install new interrupt descriptor with spin lock */ 528 /* Install new interrupt descriptor with spin lock */
529 529
@@ -544,13 +544,13 @@ acpi_ev_get_gpe_xrupt_block (
544 544
545 /* Install new interrupt handler if not SCI_INT */ 545 /* Install new interrupt handler if not SCI_INT */
546 546
547 if (interrupt_level != acpi_gbl_FADT->sci_int) { 547 if (interrupt_number != acpi_gbl_FADT->sci_int) {
548 status = acpi_os_install_interrupt_handler (interrupt_level, 548 status = acpi_os_install_interrupt_handler (interrupt_number,
549 acpi_ev_gpe_xrupt_handler, gpe_xrupt); 549 acpi_ev_gpe_xrupt_handler, gpe_xrupt);
550 if (ACPI_FAILURE (status)) { 550 if (ACPI_FAILURE (status)) {
551 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, 551 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
552 "Could not install GPE interrupt handler at level 0x%X\n", 552 "Could not install GPE interrupt handler at level 0x%X\n",
553 interrupt_level)); 553 interrupt_number));
554 return_PTR (NULL); 554 return_PTR (NULL);
555 } 555 }
556 } 556 }
@@ -584,14 +584,14 @@ acpi_ev_delete_gpe_xrupt (
584 584
585 /* We never want to remove the SCI interrupt handler */ 585 /* We never want to remove the SCI interrupt handler */
586 586
587 if (gpe_xrupt->interrupt_level == acpi_gbl_FADT->sci_int) { 587 if (gpe_xrupt->interrupt_number == acpi_gbl_FADT->sci_int) {
588 gpe_xrupt->gpe_block_list_head = NULL; 588 gpe_xrupt->gpe_block_list_head = NULL;
589 return_ACPI_STATUS (AE_OK); 589 return_ACPI_STATUS (AE_OK);
590 } 590 }
591 591
592 /* Disable this interrupt */ 592 /* Disable this interrupt */
593 593
594 status = acpi_os_remove_interrupt_handler (gpe_xrupt->interrupt_level, 594 status = acpi_os_remove_interrupt_handler (gpe_xrupt->interrupt_number,
595 acpi_ev_gpe_xrupt_handler); 595 acpi_ev_gpe_xrupt_handler);
596 if (ACPI_FAILURE (status)) { 596 if (ACPI_FAILURE (status)) {
597 return_ACPI_STATUS (status); 597 return_ACPI_STATUS (status);
@@ -621,7 +621,7 @@ acpi_ev_delete_gpe_xrupt (
621 * FUNCTION: acpi_ev_install_gpe_block 621 * FUNCTION: acpi_ev_install_gpe_block
622 * 622 *
623 * PARAMETERS: gpe_block - New GPE block 623 * PARAMETERS: gpe_block - New GPE block
624 * interrupt_level - Level to be associated with this GPE block 624 * interrupt_number - Xrupt to be associated with this GPE block
625 * 625 *
626 * RETURN: Status 626 * RETURN: Status
627 * 627 *
@@ -632,7 +632,7 @@ acpi_ev_delete_gpe_xrupt (
632static acpi_status 632static acpi_status
633acpi_ev_install_gpe_block ( 633acpi_ev_install_gpe_block (
634 struct acpi_gpe_block_info *gpe_block, 634 struct acpi_gpe_block_info *gpe_block,
635 u32 interrupt_level) 635 u32 interrupt_number)
636{ 636{
637 struct acpi_gpe_block_info *next_gpe_block; 637 struct acpi_gpe_block_info *next_gpe_block;
638 struct acpi_gpe_xrupt_info *gpe_xrupt_block; 638 struct acpi_gpe_xrupt_info *gpe_xrupt_block;
@@ -647,7 +647,7 @@ acpi_ev_install_gpe_block (
647 return_ACPI_STATUS (status); 647 return_ACPI_STATUS (status);
648 } 648 }
649 649
650 gpe_xrupt_block = acpi_ev_get_gpe_xrupt_block (interrupt_level); 650 gpe_xrupt_block = acpi_ev_get_gpe_xrupt_block (interrupt_number);
651 if (!gpe_xrupt_block) { 651 if (!gpe_xrupt_block) {
652 status = AE_NO_MEMORY; 652 status = AE_NO_MEMORY;
653 goto unlock_and_exit; 653 goto unlock_and_exit;
@@ -887,7 +887,7 @@ error_exit:
887 * gpe_block_address - Address and space_iD 887 * gpe_block_address - Address and space_iD
888 * register_count - Number of GPE register pairs in the block 888 * register_count - Number of GPE register pairs in the block
889 * gpe_block_base_number - Starting GPE number for the block 889 * gpe_block_base_number - Starting GPE number for the block
890 * interrupt_level - H/W interrupt for the block 890 * interrupt_number - H/W interrupt for the block
891 * return_gpe_block - Where the new block descriptor is returned 891 * return_gpe_block - Where the new block descriptor is returned
892 * 892 *
893 * RETURN: Status 893 * RETURN: Status
@@ -902,7 +902,7 @@ acpi_ev_create_gpe_block (
902 struct acpi_generic_address *gpe_block_address, 902 struct acpi_generic_address *gpe_block_address,
903 u32 register_count, 903 u32 register_count,
904 u8 gpe_block_base_number, 904 u8 gpe_block_base_number,
905 u32 interrupt_level, 905 u32 interrupt_number,
906 struct acpi_gpe_block_info **return_gpe_block) 906 struct acpi_gpe_block_info **return_gpe_block)
907{ 907{
908 struct acpi_gpe_block_info *gpe_block; 908 struct acpi_gpe_block_info *gpe_block;
@@ -948,7 +948,7 @@ acpi_ev_create_gpe_block (
948 948
949 /* Install the new block in the global list(s) */ 949 /* Install the new block in the global list(s) */
950 950
951 status = acpi_ev_install_gpe_block (gpe_block, interrupt_level); 951 status = acpi_ev_install_gpe_block (gpe_block, interrupt_number);
952 if (ACPI_FAILURE (status)) { 952 if (ACPI_FAILURE (status)) {
953 ACPI_MEM_FREE (gpe_block); 953 ACPI_MEM_FREE (gpe_block);
954 return_ACPI_STATUS (status); 954 return_ACPI_STATUS (status);
@@ -1013,7 +1013,7 @@ acpi_ev_create_gpe_block (
1013 ((gpe_block->register_count * ACPI_GPE_REGISTER_WIDTH) -1)), 1013 ((gpe_block->register_count * ACPI_GPE_REGISTER_WIDTH) -1)),
1014 gpe_device->name.ascii, 1014 gpe_device->name.ascii,
1015 gpe_block->register_count, 1015 gpe_block->register_count,
1016 interrupt_level)); 1016 interrupt_number));
1017 1017
1018 /* Enable all valid GPEs found above */ 1018 /* Enable all valid GPEs found above */
1019 1019
diff --git a/drivers/acpi/events/evrgnini.c b/drivers/acpi/events/evrgnini.c
index 95bc09c73a6a..f2d53af97610 100644
--- a/drivers/acpi/events/evrgnini.c
+++ b/drivers/acpi/events/evrgnini.c
@@ -218,10 +218,14 @@ acpi_ev_pci_config_region_setup (
218 while (pci_root_node != acpi_gbl_root_node) { 218 while (pci_root_node != acpi_gbl_root_node) {
219 status = acpi_ut_execute_HID (pci_root_node, &object_hID); 219 status = acpi_ut_execute_HID (pci_root_node, &object_hID);
220 if (ACPI_SUCCESS (status)) { 220 if (ACPI_SUCCESS (status)) {
221 /* Got a valid _HID, check if this is a PCI root */ 221 /*
222 222 * Got a valid _HID string, check if this is a PCI root.
223 * New for ACPI 3.0: check for a PCI Express root also.
224 */
223 if (!(ACPI_STRNCMP (object_hID.value, PCI_ROOT_HID_STRING, 225 if (!(ACPI_STRNCMP (object_hID.value, PCI_ROOT_HID_STRING,
224 sizeof (PCI_ROOT_HID_STRING)))) { 226 sizeof (PCI_ROOT_HID_STRING)) ||
227 !(ACPI_STRNCMP (object_hID.value, PCI_EXPRESS_ROOT_HID_STRING,
228 sizeof (PCI_EXPRESS_ROOT_HID_STRING))))) {
225 /* Install a handler for this PCI root bridge */ 229 /* Install a handler for this PCI root bridge */
226 230
227 status = acpi_install_address_space_handler ((acpi_handle) pci_root_node, 231 status = acpi_install_address_space_handler ((acpi_handle) pci_root_node,
diff --git a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c
index f337dc2cc569..c5f74d7b64d8 100644
--- a/drivers/acpi/events/evxfevnt.c
+++ b/drivers/acpi/events/evxfevnt.c
@@ -635,7 +635,7 @@ unlock_and_exit:
635 * PARAMETERS: gpe_device - Handle to the parent GPE Block Device 635 * PARAMETERS: gpe_device - Handle to the parent GPE Block Device
636 * gpe_block_address - Address and space_iD 636 * gpe_block_address - Address and space_iD
637 * register_count - Number of GPE register pairs in the block 637 * register_count - Number of GPE register pairs in the block
638 * interrupt_level - H/W interrupt for the block 638 * interrupt_number - H/W interrupt for the block
639 * 639 *
640 * RETURN: Status 640 * RETURN: Status
641 * 641 *
@@ -648,7 +648,7 @@ acpi_install_gpe_block (
648 acpi_handle gpe_device, 648 acpi_handle gpe_device,
649 struct acpi_generic_address *gpe_block_address, 649 struct acpi_generic_address *gpe_block_address,
650 u32 register_count, 650 u32 register_count,
651 u32 interrupt_level) 651 u32 interrupt_number)
652{ 652{
653 acpi_status status; 653 acpi_status status;
654 union acpi_operand_object *obj_desc; 654 union acpi_operand_object *obj_desc;
@@ -681,7 +681,7 @@ acpi_install_gpe_block (
681 * is always zero 681 * is always zero
682 */ 682 */
683 status = acpi_ev_create_gpe_block (node, gpe_block_address, register_count, 683 status = acpi_ev_create_gpe_block (node, gpe_block_address, register_count,
684 0, interrupt_level, &gpe_block); 684 0, interrupt_number, &gpe_block);
685 if (ACPI_FAILURE (status)) { 685 if (ACPI_FAILURE (status)) {
686 goto unlock_and_exit; 686 goto unlock_and_exit;
687 } 687 }
diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c
index 408500648114..ae6cad85e015 100644
--- a/drivers/acpi/executer/exdump.c
+++ b/drivers/acpi/executer/exdump.c
@@ -51,6 +51,11 @@
51#define _COMPONENT ACPI_EXECUTER 51#define _COMPONENT ACPI_EXECUTER
52 ACPI_MODULE_NAME ("exdump") 52 ACPI_MODULE_NAME ("exdump")
53 53
54/*
55 * The following routines are used for debug output only
56 */
57#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
58
54/* Local prototypes */ 59/* Local prototypes */
55 60
56#ifdef ACPI_FUTURE_USAGE 61#ifdef ACPI_FUTURE_USAGE
@@ -76,11 +81,6 @@ acpi_ex_out_address (
76#endif /* ACPI_FUTURE_USAGE */ 81#endif /* ACPI_FUTURE_USAGE */
77 82
78 83
79/*
80 * The following routines are used for debug output only
81 */
82#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
83
84/******************************************************************************* 84/*******************************************************************************
85 * 85 *
86 * FUNCTION: acpi_ex_dump_operand 86 * FUNCTION: acpi_ex_dump_operand
@@ -118,7 +118,7 @@ acpi_ex_dump_operand (
118 } 118 }
119 119
120 if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) == ACPI_DESC_TYPE_NAMED) { 120 if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) == ACPI_DESC_TYPE_NAMED) {
121 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p is a NS Node: ", obj_desc)); 121 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p Namespace Node: ", obj_desc));
122 ACPI_DUMP_ENTRY (obj_desc, ACPI_LV_EXEC); 122 ACPI_DUMP_ENTRY (obj_desc, ACPI_LV_EXEC);
123 return; 123 return;
124 } 124 }
@@ -467,7 +467,7 @@ acpi_ex_dump_operands (
467 } 467 }
468 468
469 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, 469 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
470 "************* Stack dump from %s(%d), %s\n", 470 "************* Operand Stack dump from %s(%d), %s\n",
471 module_name, line_number, note)); 471 module_name, line_number, note));
472 return; 472 return;
473} 473}
diff --git a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c
index 2725db0901b8..763ffeea8503 100644
--- a/drivers/acpi/executer/exstore.c
+++ b/drivers/acpi/executer/exstore.c
@@ -574,7 +574,7 @@ acpi_ex_store_object_to_node (
574 574
575 /* If no implicit conversion, drop into the default case below */ 575 /* If no implicit conversion, drop into the default case below */
576 576
577 if (!implicit_conversion) { 577 if ((!implicit_conversion) || (walk_state->opcode == AML_COPY_OP)) {
578 /* Force execution of default (no implicit conversion) */ 578 /* Force execution of default (no implicit conversion) */
579 579
580 target_type = ACPI_TYPE_ANY; 580 target_type = ACPI_TYPE_ANY;
@@ -634,7 +634,7 @@ acpi_ex_store_object_to_node (
634 default: 634 default:
635 635
636 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, 636 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
637 "Storing %s (%p) directly into node (%p), no implicit conversion\n", 637 "Storing %s (%p) directly into node (%p) with no implicit conversion\n",
638 acpi_ut_get_object_type_name (source_desc), source_desc, node)); 638 acpi_ut_get_object_type_name (source_desc), source_desc, node));
639 639
640 /* No conversions for all other types. Just attach the source object */ 640 /* No conversions for all other types. Just attach the source object */
diff --git a/drivers/acpi/executer/exstoren.c b/drivers/acpi/executer/exstoren.c
index 120f30ed0bd4..433588ab432a 100644
--- a/drivers/acpi/executer/exstoren.c
+++ b/drivers/acpi/executer/exstoren.c
@@ -265,10 +265,6 @@ acpi_ex_store_object_to_object (
265 265
266 case ACPI_TYPE_BUFFER: 266 case ACPI_TYPE_BUFFER:
267 267
268 /*
269 * Note: There is different store behavior depending on the original
270 * source type
271 */
272 status = acpi_ex_store_buffer_to_buffer (actual_src_desc, dest_desc); 268 status = acpi_ex_store_buffer_to_buffer (actual_src_desc, dest_desc);
273 break; 269 break;
274 270
diff --git a/drivers/acpi/namespace/nsdump.c b/drivers/acpi/namespace/nsdump.c
index 6c2aef0e0dd4..05af95322a62 100644
--- a/drivers/acpi/namespace/nsdump.c
+++ b/drivers/acpi/namespace/nsdump.c
@@ -475,7 +475,7 @@ acpi_ns_dump_one_object (
475 475
476 while (obj_desc) { 476 while (obj_desc) {
477 obj_type = ACPI_TYPE_INVALID; 477 obj_type = ACPI_TYPE_INVALID;
478 acpi_os_printf (" Attached Object %p: ", obj_desc); 478 acpi_os_printf ("Attached Object %p: ", obj_desc);
479 479
480 /* Decode the type of attached object and dump the contents */ 480 /* Decode the type of attached object and dump the contents */
481 481
@@ -484,9 +484,9 @@ acpi_ns_dump_one_object (
484 484
485 acpi_os_printf ("(Ptr to Node)\n"); 485 acpi_os_printf ("(Ptr to Node)\n");
486 bytes_to_dump = sizeof (struct acpi_namespace_node); 486 bytes_to_dump = sizeof (struct acpi_namespace_node);
487 ACPI_DUMP_BUFFER (obj_desc, bytes_to_dump);
487 break; 488 break;
488 489
489
490 case ACPI_DESC_TYPE_OPERAND: 490 case ACPI_DESC_TYPE_OPERAND:
491 491
492 obj_type = ACPI_GET_OBJECT_TYPE (obj_desc); 492 obj_type = ACPI_GET_OBJECT_TYPE (obj_desc);
@@ -497,24 +497,19 @@ acpi_ns_dump_one_object (
497 bytes_to_dump = 32; 497 bytes_to_dump = 32;
498 } 498 }
499 else { 499 else {
500 acpi_os_printf ("(Ptr to ACPI Object type %s, %X)\n", 500 acpi_os_printf ("(Ptr to ACPI Object type %X [%s])\n",
501 acpi_ut_get_type_name (obj_type), obj_type); 501 obj_type, acpi_ut_get_type_name (obj_type));
502 bytes_to_dump = sizeof (union acpi_operand_object); 502 bytes_to_dump = sizeof (union acpi_operand_object);
503 } 503 }
504 break;
505 504
505 ACPI_DUMP_BUFFER (obj_desc, bytes_to_dump);
506 break;
506 507
507 default: 508 default:
508 509
509 acpi_os_printf (
510 "(String or Buffer ptr - not an object descriptor) [%s]\n",
511 acpi_ut_get_descriptor_name (obj_desc));
512 bytes_to_dump = 16;
513 break; 510 break;
514 } 511 }
515 512
516 ACPI_DUMP_BUFFER (obj_desc, bytes_to_dump);
517
518 /* If value is NOT an internal object, we are done */ 513 /* If value is NOT an internal object, we are done */
519 514
520 if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) { 515 if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) {
@@ -525,13 +520,17 @@ acpi_ns_dump_one_object (
525 * Valid object, get the pointer to next level, if any 520 * Valid object, get the pointer to next level, if any
526 */ 521 */
527 switch (obj_type) { 522 switch (obj_type) {
523 case ACPI_TYPE_BUFFER:
528 case ACPI_TYPE_STRING: 524 case ACPI_TYPE_STRING:
525 /*
526 * NOTE: takes advantage of common fields between string/buffer
527 */
528 bytes_to_dump = obj_desc->string.length;
529 obj_desc = (void *) obj_desc->string.pointer; 529 obj_desc = (void *) obj_desc->string.pointer;
530 break; 530 acpi_os_printf ( "(Buffer/String pointer %p length %X)\n",
531 531 obj_desc, bytes_to_dump);
532 case ACPI_TYPE_BUFFER: 532 ACPI_DUMP_BUFFER (obj_desc, bytes_to_dump);
533 obj_desc = (void *) obj_desc->buffer.pointer; 533 goto cleanup;
534 break;
535 534
536 case ACPI_TYPE_BUFFER_FIELD: 535 case ACPI_TYPE_BUFFER_FIELD:
537 obj_desc = (union acpi_operand_object *) obj_desc->buffer_field.buffer_obj; 536 obj_desc = (union acpi_operand_object *) obj_desc->buffer_field.buffer_obj;
diff --git a/drivers/acpi/parser/psopcode.c b/drivers/acpi/parser/psopcode.c
index 5744673568c0..95ef5e8947a8 100644
--- a/drivers/acpi/parser/psopcode.c
+++ b/drivers/acpi/parser/psopcode.c
@@ -311,7 +311,7 @@ const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] =
311/* ACPI 2.0 opcodes */ 311/* ACPI 2.0 opcodes */
312 312
313/* 6E */ ACPI_OP ("QwordConst", ARGP_QWORD_OP, ARGI_QWORD_OP, ACPI_TYPE_INTEGER, AML_CLASS_ARGUMENT, AML_TYPE_LITERAL, AML_CONSTANT), 313/* 6E */ ACPI_OP ("QwordConst", ARGP_QWORD_OP, ARGI_QWORD_OP, ACPI_TYPE_INTEGER, AML_CLASS_ARGUMENT, AML_TYPE_LITERAL, AML_CONSTANT),
314/* 6F */ ACPI_OP ("Package /*Var*/", ARGP_VAR_PACKAGE_OP, ARGI_VAR_PACKAGE_OP, ACPI_TYPE_PACKAGE, AML_CLASS_CREATE, AML_TYPE_CREATE_OBJECT, AML_HAS_ARGS | AML_DEFER), 314/* 6F */ ACPI_OP ("Package", /* Var */ ARGP_VAR_PACKAGE_OP, ARGI_VAR_PACKAGE_OP, ACPI_TYPE_PACKAGE, AML_CLASS_CREATE, AML_TYPE_CREATE_OBJECT, AML_HAS_ARGS | AML_DEFER),
315/* 70 */ ACPI_OP ("ConcatenateResTemplate", ARGP_CONCAT_RES_OP, ARGI_CONCAT_RES_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT), 315/* 70 */ ACPI_OP ("ConcatenateResTemplate", ARGP_CONCAT_RES_OP, ARGI_CONCAT_RES_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT),
316/* 71 */ ACPI_OP ("Mod", ARGP_MOD_OP, ARGI_MOD_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT), 316/* 71 */ ACPI_OP ("Mod", ARGP_MOD_OP, ARGI_MOD_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_1T_1R, AML_FLAGS_EXEC_2A_1T_1R | AML_CONSTANT),
317/* 72 */ ACPI_OP ("CreateQWordField", ARGP_CREATE_QWORD_FIELD_OP,ARGI_CREATE_QWORD_FIELD_OP, ACPI_TYPE_BUFFER_FIELD, AML_CLASS_CREATE, AML_TYPE_CREATE_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE), 317/* 72 */ ACPI_OP ("CreateQWordField", ARGP_CREATE_QWORD_FIELD_OP,ARGI_CREATE_QWORD_FIELD_OP, ACPI_TYPE_BUFFER_FIELD, AML_CLASS_CREATE, AML_TYPE_CREATE_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_CREATE),
diff --git a/drivers/acpi/resources/rsdump.c b/drivers/acpi/resources/rsdump.c
index 1935dab2ab51..2c3bb8c35741 100644
--- a/drivers/acpi/resources/rsdump.c
+++ b/drivers/acpi/resources/rsdump.c
@@ -48,6 +48,9 @@
48#define _COMPONENT ACPI_RESOURCES 48#define _COMPONENT ACPI_RESOURCES
49 ACPI_MODULE_NAME ("rsdump") 49 ACPI_MODULE_NAME ("rsdump")
50 50
51
52#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
53
51/* Local prototypes */ 54/* Local prototypes */
52 55
53static void 56static void
@@ -103,7 +106,6 @@ acpi_rs_dump_vendor_specific (
103 union acpi_resource_data *data); 106 union acpi_resource_data *data);
104 107
105 108
106#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
107/******************************************************************************* 109/*******************************************************************************
108 * 110 *
109 * FUNCTION: acpi_rs_dump_irq 111 * FUNCTION: acpi_rs_dump_irq
diff --git a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c
index 11e884957162..31c30a32e5c9 100644
--- a/drivers/acpi/utilities/utcopy.c
+++ b/drivers/acpi/utilities/utcopy.c
@@ -694,58 +694,50 @@ acpi_ut_copy_simple_object (
694 dest_desc->common.reference_count = reference_count; 694 dest_desc->common.reference_count = reference_count;
695 dest_desc->common.next_object = next_object; 695 dest_desc->common.next_object = next_object;
696 696
697 /* New object is not static, regardless of source */
698
699 dest_desc->common.flags &= ~AOPOBJ_STATIC_POINTER;
700
697 /* Handle the objects with extra data */ 701 /* Handle the objects with extra data */
698 702
699 switch (ACPI_GET_OBJECT_TYPE (dest_desc)) { 703 switch (ACPI_GET_OBJECT_TYPE (dest_desc)) {
700 case ACPI_TYPE_BUFFER: 704 case ACPI_TYPE_BUFFER:
701
702 dest_desc->buffer.node = NULL;
703 dest_desc->common.flags = source_desc->common.flags;
704
705 /* 705 /*
706 * Allocate and copy the actual buffer if and only if: 706 * Allocate and copy the actual buffer if and only if:
707 * 1) There is a valid buffer pointer 707 * 1) There is a valid buffer pointer
708 * 2) The buffer is not static (not in an ACPI table) (in this case, 708 * 2) The buffer has a length > 0
709 * the actual pointer was already copied above)
710 */ 709 */
711 if ((source_desc->buffer.pointer) && 710 if ((source_desc->buffer.pointer) &&
712 (!(source_desc->common.flags & AOPOBJ_STATIC_POINTER))) { 711 (source_desc->buffer.length)) {
713 dest_desc->buffer.pointer = NULL; 712 dest_desc->buffer.pointer =
714 713 ACPI_MEM_ALLOCATE (source_desc->buffer.length);
715 /* Create an actual buffer only if length > 0 */ 714 if (!dest_desc->buffer.pointer) {
716 715 return (AE_NO_MEMORY);
717 if (source_desc->buffer.length) { 716 }
718 dest_desc->buffer.pointer =
719 ACPI_MEM_ALLOCATE (source_desc->buffer.length);
720 if (!dest_desc->buffer.pointer) {
721 return (AE_NO_MEMORY);
722 }
723 717
724 /* Copy the actual buffer data */ 718 /* Copy the actual buffer data */
725 719
726 ACPI_MEMCPY (dest_desc->buffer.pointer, 720 ACPI_MEMCPY (dest_desc->buffer.pointer,
727 source_desc->buffer.pointer, 721 source_desc->buffer.pointer,
728 source_desc->buffer.length); 722 source_desc->buffer.length);
729 }
730 } 723 }
731 break; 724 break;
732 725
733 case ACPI_TYPE_STRING: 726 case ACPI_TYPE_STRING:
734
735 /* 727 /*
736 * Allocate and copy the actual string if and only if: 728 * Allocate and copy the actual string if and only if:
737 * 1) There is a valid string pointer 729 * 1) There is a valid string pointer
738 * 2) The string is not static (not in an ACPI table) (in this case, 730 * (Pointer to a NULL string is allowed)
739 * the actual pointer was already copied above)
740 */ 731 */
741 if ((source_desc->string.pointer) && 732 if (source_desc->string.pointer) {
742 (!(source_desc->common.flags & AOPOBJ_STATIC_POINTER))) {
743 dest_desc->string.pointer = 733 dest_desc->string.pointer =
744 ACPI_MEM_ALLOCATE ((acpi_size) source_desc->string.length + 1); 734 ACPI_MEM_ALLOCATE ((acpi_size) source_desc->string.length + 1);
745 if (!dest_desc->string.pointer) { 735 if (!dest_desc->string.pointer) {
746 return (AE_NO_MEMORY); 736 return (AE_NO_MEMORY);
747 } 737 }
748 738
739 /* Copy the actual string data */
740
749 ACPI_MEMCPY (dest_desc->string.pointer, source_desc->string.pointer, 741 ACPI_MEMCPY (dest_desc->string.pointer, source_desc->string.pointer,
750 (acpi_size) source_desc->string.length + 1); 742 (acpi_size) source_desc->string.length + 1);
751 } 743 }