aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/namespace/nsload.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/namespace/nsload.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/namespace/nsload.c')
-rw-r--r--drivers/acpi/namespace/nsload.c42
1 files changed, 8 insertions, 34 deletions
diff --git a/drivers/acpi/namespace/nsload.c b/drivers/acpi/namespace/nsload.c
index 34e497016601..1428a84a31e6 100644
--- a/drivers/acpi/namespace/nsload.c
+++ b/drivers/acpi/namespace/nsload.c
@@ -198,7 +198,7 @@ acpi_ns_load_table_by_type (
198 switch (table_type) { 198 switch (table_type) {
199 case ACPI_TABLE_DSDT: 199 case ACPI_TABLE_DSDT:
200 200
201 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Loading DSDT\n")); 201 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Namespace load: DSDT\n"));
202 202
203 table_desc = acpi_gbl_table_lists[ACPI_TABLE_DSDT].next; 203 table_desc = acpi_gbl_table_lists[ACPI_TABLE_DSDT].next;
204 204
@@ -218,17 +218,18 @@ acpi_ns_load_table_by_type (
218 218
219 219
220 case ACPI_TABLE_SSDT: 220 case ACPI_TABLE_SSDT:
221 case ACPI_TABLE_PSDT:
221 222
222 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Loading %d SSDTs\n", 223 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Namespace load: %d SSDT or PSDTs\n",
223 acpi_gbl_table_lists[ACPI_TABLE_SSDT].count)); 224 acpi_gbl_table_lists[table_type].count));
224 225
225 /* 226 /*
226 * Traverse list of SSDT tables 227 * Traverse list of SSDT or PSDT tables
227 */ 228 */
228 table_desc = acpi_gbl_table_lists[ACPI_TABLE_SSDT].next; 229 table_desc = acpi_gbl_table_lists[table_type].next;
229 for (i = 0; i < acpi_gbl_table_lists[ACPI_TABLE_SSDT].count; i++) { 230 for (i = 0; i < acpi_gbl_table_lists[table_type].count; i++) {
230 /* 231 /*
231 * Only attempt to load table if it is not 232 * Only attempt to load table into namespace if it is not
232 * already loaded! 233 * already loaded!
233 */ 234 */
234 if (!table_desc->loaded_into_namespace) { 235 if (!table_desc->loaded_into_namespace) {
@@ -245,33 +246,6 @@ acpi_ns_load_table_by_type (
245 break; 246 break;
246 247
247 248
248 case ACPI_TABLE_PSDT:
249
250 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Loading %d PSDTs\n",
251 acpi_gbl_table_lists[ACPI_TABLE_PSDT].count));
252
253 /*
254 * Traverse list of PSDT tables
255 */
256 table_desc = acpi_gbl_table_lists[ACPI_TABLE_PSDT].next;
257
258 for (i = 0; i < acpi_gbl_table_lists[ACPI_TABLE_PSDT].count; i++) {
259 /* Only attempt to load table if it is not already loaded! */
260
261 if (!table_desc->loaded_into_namespace) {
262 status = acpi_ns_load_table (table_desc, acpi_gbl_root_node);
263 if (ACPI_FAILURE (status)) {
264 break;
265 }
266
267 table_desc->loaded_into_namespace = TRUE;
268 }
269
270 table_desc = table_desc->next;
271 }
272 break;
273
274
275 default: 249 default:
276 status = AE_SUPPORT; 250 status = AE_SUPPORT;
277 break; 251 break;