aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables/tbinstal.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/tbinstal.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/tbinstal.c')
-rw-r--r--drivers/acpi/tables/tbinstal.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c
index 2ad72f204551..698799901f55 100644
--- a/drivers/acpi/tables/tbinstal.c
+++ b/drivers/acpi/tables/tbinstal.c
@@ -124,9 +124,7 @@ acpi_tb_match_signature (
124 * 124 *
125 * RETURN: Status 125 * RETURN: Status
126 * 126 *
127 * DESCRIPTION: Load and validate all tables other than the RSDT. The RSDT must 127 * DESCRIPTION: Install the table into the global data structures.
128 * already be loaded and validated.
129 * Install the table into the global data structs.
130 * 128 *
131 ******************************************************************************/ 129 ******************************************************************************/
132 130
@@ -136,6 +134,7 @@ acpi_tb_install_table (
136{ 134{
137 acpi_status status; 135 acpi_status status;
138 136
137
139 ACPI_FUNCTION_TRACE ("tb_install_table"); 138 ACPI_FUNCTION_TRACE ("tb_install_table");
140 139
141 140
@@ -143,22 +142,33 @@ acpi_tb_install_table (
143 142
144 status = acpi_ut_acquire_mutex (ACPI_MTX_TABLES); 143 status = acpi_ut_acquire_mutex (ACPI_MTX_TABLES);
145 if (ACPI_FAILURE (status)) { 144 if (ACPI_FAILURE (status)) {
146 ACPI_REPORT_ERROR (("Could not acquire table mutex for [%4.4s], %s\n", 145 ACPI_REPORT_ERROR (("Could not acquire table mutex, %s\n",
147 table_info->pointer->signature, acpi_format_exception (status))); 146 acpi_format_exception (status)));
148 return_ACPI_STATUS (status); 147 return_ACPI_STATUS (status);
149 } 148 }
150 149
150 /*
151 * Ignore a table that is already installed. For example, some BIOS
152 * ASL code will repeatedly attempt to load the same SSDT.
153 */
154 status = acpi_tb_is_table_installed (table_info);
155 if (ACPI_FAILURE (status)) {
156 goto unlock_and_exit;
157 }
158
151 /* Install the table into the global data structure */ 159 /* Install the table into the global data structure */
152 160
153 status = acpi_tb_init_table_descriptor (table_info->type, table_info); 161 status = acpi_tb_init_table_descriptor (table_info->type, table_info);
154 if (ACPI_FAILURE (status)) { 162 if (ACPI_FAILURE (status)) {
155 ACPI_REPORT_ERROR (("Could not install ACPI table [%4.4s], %s\n", 163 ACPI_REPORT_ERROR (("Could not install table [%4.4s], %s\n",
156 table_info->pointer->signature, acpi_format_exception (status))); 164 table_info->pointer->signature, acpi_format_exception (status)));
157 } 165 }
158 166
159 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%s located at %p\n", 167 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%s located at %p\n",
160 acpi_gbl_table_data[table_info->type].name, table_info->pointer)); 168 acpi_gbl_table_data[table_info->type].name, table_info->pointer));
161 169
170
171unlock_and_exit:
162 (void) acpi_ut_release_mutex (ACPI_MTX_TABLES); 172 (void) acpi_ut_release_mutex (ACPI_MTX_TABLES);
163 return_ACPI_STATUS (status); 173 return_ACPI_STATUS (status);
164} 174}