aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables/tbxface.c
diff options
context:
space:
mode:
authorRobert Moore <robert.moore@intel.com>2005-07-29 18:15:00 -0400
committerLen Brown <len.brown@intel.com>2005-07-30 00:51:39 -0400
commit0c9938cc75057c0fca1af55a55dcfc2842436695 (patch)
treed18e809bf9e3811f20c609b6515d4d1b8520cfbc /drivers/acpi/tables/tbxface.c
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/tables/tbxface.c')
-rw-r--r--drivers/acpi/tables/tbxface.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c
index ca2dbdd23ed3..e18a05d1b9b3 100644
--- a/drivers/acpi/tables/tbxface.c
+++ b/drivers/acpi/tables/tbxface.c
@@ -182,10 +182,23 @@ acpi_load_table (
182 return_ACPI_STATUS (status); 182 return_ACPI_STATUS (status);
183 } 183 }
184 184
185 /* Check signature for a valid table type */
186
187 status = acpi_tb_recognize_table (&table_info, ACPI_TABLE_ALL);
188 if (ACPI_FAILURE (status)) {
189 return_ACPI_STATUS (status);
190 }
191
185 /* Install the new table into the local data structures */ 192 /* Install the new table into the local data structures */
186 193
187 status = acpi_tb_install_table (&table_info); 194 status = acpi_tb_install_table (&table_info);
188 if (ACPI_FAILURE (status)) { 195 if (ACPI_FAILURE (status)) {
196 if (status == AE_ALREADY_EXISTS) {
197 /* Table already exists, no error */
198
199 status = AE_OK;
200 }
201
189 /* Free table allocated by acpi_tb_get_table_body */ 202 /* Free table allocated by acpi_tb_get_table_body */
190 203
191 acpi_tb_delete_single_table (&table_info); 204 acpi_tb_delete_single_table (&table_info);
@@ -261,6 +274,7 @@ acpi_unload_table (
261 * simply a position within the hierarchy 274 * simply a position within the hierarchy
262 */ 275 */
263 acpi_ns_delete_namespace_by_owner (table_desc->owner_id); 276 acpi_ns_delete_namespace_by_owner (table_desc->owner_id);
277 acpi_ut_release_owner_id (&table_desc->owner_id);
264 table_desc = table_desc->next; 278 table_desc = table_desc->next;
265 } 279 }
266 280