aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi/executer
diff options
context:
space:
mode:
authorRobert Moore <robert.moore@intel.com>2005-07-29 15:15:00 -0700
committerLen Brown <len.brown@intel.com>2005-07-30 00:51:39 -0400
commit0c9938cc75057c0fca1af55a55dcfc2842436695 (patch)
treed18e809bf9e3811f20c609b6515d4d1b8520cfbc /drivers/acpi/executer
parentdd8f39bbf5154cdbfd698fc70c66faba33eafa44 (diff)
[ACPI] ACPICA 20050729 from Bob Moore
Implemented support to ignore an attempt to install/load a particular ACPI table more than once. Apparently there exists BIOS code that repeatedly attempts to load the same SSDT upon certain events. Thanks to Venkatesh Pallipadi. Restructured the main interface to the AML parser in order to correctly handle all exceptional conditions. This will prevent leakage of the OwnerId resource and should eliminate the AE_OWNER_ID_LIMIT exceptions seen on some machines. Thanks to Alexey Starikovskiy. Support for "module level code" has been disabled in this version due to a number of issues that have appeared on various machines. The support can be enabled by defining ACPI_ENABLE_MODULE_LEVEL_CODE during subsystem compilation. When the issues are fully resolved, the code will be enabled by default again. Modified the internal functions for debug print support to define the FunctionName parameter as a (const char *) for compatibility with compiler built-in macros such as __FUNCTION__, etc. Linted the entire ACPICA source tree for both 32-bit and 64-bit. Signed-off-by: Robert Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/executer')
-rw-r--r--drivers/acpi/executer/exconfig.c19
-rw-r--r--drivers/acpi/executer/exdump.c2
-rw-r--r--drivers/acpi/executer/exoparg1.c2
3 files changed, 16 insertions, 7 deletions
diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c
index 76c6ebd0231..d11e9ec827f 100644
--- a/drivers/acpi/executer/exconfig.c
+++ b/drivers/acpi/executer/exconfig.c
@@ -99,6 +99,11 @@ acpi_ex_add_table (
return_ACPI_STATUS (AE_NO_MEMORY);
}
+ /* Init the table handle */
+
+ obj_desc->reference.opcode = AML_LOAD_OP;
+ *ddb_handle = obj_desc;
+
/* Install the new table into the local data structures */
ACPI_MEMSET (&table_info, 0, sizeof (struct acpi_table_desc));
@@ -109,7 +114,14 @@ acpi_ex_add_table (
table_info.allocation = ACPI_MEM_ALLOCATED;
status = acpi_tb_install_table (&table_info);
+ obj_desc->reference.object = table_info.installed_desc;
+
if (ACPI_FAILURE (status)) {
+ if (status == AE_ALREADY_EXISTS) {
+ /* Table already exists, just return the handle */
+
+ return_ACPI_STATUS (AE_OK);
+ }
goto cleanup;
}
@@ -123,16 +135,12 @@ acpi_ex_add_table (
goto cleanup;
}
- /* Init the table handle */
-
- obj_desc->reference.opcode = AML_LOAD_OP;
- obj_desc->reference.object = table_info.installed_desc;
- *ddb_handle = obj_desc;
return_ACPI_STATUS (AE_OK);
cleanup:
acpi_ut_remove_reference (obj_desc);
+ *ddb_handle = NULL;
return_ACPI_STATUS (status);
}
@@ -488,6 +496,7 @@ acpi_ex_unload_table (
* (Offset contains the table_id)
*/
acpi_ns_delete_namespace_by_owner (table_info->owner_id);
+ acpi_ut_release_owner_id (&table_info->owner_id);
/* Delete the table itself */
diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c
index fd13cc3db01..4f98dceed39 100644
--- a/drivers/acpi/executer/exdump.c
+++ b/drivers/acpi/executer/exdump.c
@@ -598,7 +598,7 @@ acpi_ex_dump_reference (
acpi_os_printf ("Could not convert name to pathname\n");
}
else {
- acpi_os_printf ("%s\n", ret_buf.pointer);
+ acpi_os_printf ("%s\n", (char *) ret_buf.pointer);
ACPI_MEM_FREE (ret_buf.pointer);
}
}
diff --git a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c
index c1ba8b48228..48c30f80008 100644
--- a/drivers/acpi/executer/exoparg1.c
+++ b/drivers/acpi/executer/exoparg1.c
@@ -955,7 +955,7 @@ acpi_ex_opcode_1A_0T_1R (
*/
return_desc = *(operand[0]->reference.where);
if (return_desc) {
- acpi_ut_add_reference (return_desc);
+ acpi_ut_add_reference (return_desc);
}
break;