aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/dsmethod.c
diff options
context:
space:
mode:
authorLin Ming <ming.m.lin@intel.com>2009-08-13 02:03:15 -0400
committerLen Brown <len.brown@intel.com>2009-08-28 19:40:39 -0400
commit7f0c826a437157d2b19662977e9cf3b472cf24a6 (patch)
tree359c14eddb406007350e8f8a7bf96c9f8d85a2ab /drivers/acpi/acpica/dsmethod.c
parent999e08f99846a1fd6ee9642ec306a2d318925116 (diff)
ACPICA: Add support for module-level executable AML code
Add limited support for executable AML code that exists outside of any control method. This type of code has been illegal since ACPI 2.0. The code must exist in an If/Else/While block. All AML tables are supported, including tables that are dynamically loaded. ACPICA BZ 762. http://acpica.org/bugzilla/show_bug.cgi?id=762 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/dsmethod.c')
-rw-r--r--drivers/acpi/acpica/dsmethod.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c
index 14b8b8ed8023..567a4899a018 100644
--- a/drivers/acpi/acpica/dsmethod.c
+++ b/drivers/acpi/acpica/dsmethod.c
@@ -578,10 +578,15 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
578 } 578 }
579 579
580 /* 580 /*
581 * Delete any namespace objects created anywhere within 581 * Delete any namespace objects created anywhere within the
582 * the namespace by the execution of this method 582 * namespace by the execution of this method. Unless this method
583 * is a module-level executable code method, in which case we
584 * want make the objects permanent.
583 */ 585 */
584 acpi_ns_delete_namespace_by_owner(method_desc->method.owner_id); 586 if (!(method_desc->method.flags & AOPOBJ_MODULE_LEVEL)) {
587 acpi_ns_delete_namespace_by_owner(method_desc->method.
588 owner_id);
589 }
585 } 590 }
586 591
587 /* Decrement the thread count on the method */ 592 /* Decrement the thread count on the method */
@@ -622,7 +627,9 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
622 627
623 /* No more threads, we can free the owner_id */ 628 /* No more threads, we can free the owner_id */
624 629
625 acpi_ut_release_owner_id(&method_desc->method.owner_id); 630 if (!(method_desc->method.flags & AOPOBJ_MODULE_LEVEL)) {
631 acpi_ut_release_owner_id(&method_desc->method.owner_id);
632 }
626 } 633 }
627 634
628 return_VOID; 635 return_VOID;