aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dispatcher/dswload.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2006-05-12 17:12:00 -0400
committerLen Brown <len.brown@intel.com>2006-06-14 02:34:48 -0400
commit958dd242b691f64ab4632b4903dbb1e16fee8269 (patch)
treeddf4932fb4e3023dd0d1914571f17f2e3b03978d /drivers/acpi/dispatcher/dswload.c
parentb229cf92eee616c7cb5ad8cdb35a19b119f00bc8 (diff)
ACPI: ACPICA 20060512
Replaced the acpi_os_queue_for_execution() with a new interface named acpi_os_execute(). The major difference is that the new interface does not have a Priority parameter, this appeared to be useless and has been replaced by a Type parameter. The Type tells the OS what type of execution is being requested, such as global lock handler, notify handler, GPE handler, etc. This allows the host to queue and execute the request as appropriate for the request type, possibly using different work queues and different priorities for the various request types. This enables fixes for multithreading deadlock problems such as http://bugzilla.kernel.org/show_bug.cgi?id=5534 (Alexey Starikovskiy and Bob Moore) Fixed a possible memory leak associated with the support for the so-called "implicit return" ACPI extension. Reported by FreeBSD (Fiodor Suietov) http://bugzilla.kernel.org/show_bug.cgi?id=6514 Fixed a problem with the Load() operator where a table load from an operation region could overwrite an internal table buffer by up to 7 bytes and cause alignment faults on IPF systems. (With assistance from Luming Yu) Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/dispatcher/dswload.c')
-rw-r--r--drivers/acpi/dispatcher/dswload.c41
1 files changed, 36 insertions, 5 deletions
diff --git a/drivers/acpi/dispatcher/dswload.c b/drivers/acpi/dispatcher/dswload.c
index a8deb700cf33..35074399c617 100644
--- a/drivers/acpi/dispatcher/dswload.c
+++ b/drivers/acpi/dispatcher/dswload.c
@@ -178,12 +178,12 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
178 * Target of Scope() not found. Generate an External for it, and 178 * Target of Scope() not found. Generate an External for it, and
179 * insert the name into the namespace. 179 * insert the name into the namespace.
180 */ 180 */
181 acpi_dm_add_to_external_list(path); 181 acpi_dm_add_to_external_list(path, ACPI_TYPE_DEVICE, 0);
182 status = 182 status =
183 acpi_ns_lookup(walk_state->scope_info, path, 183 acpi_ns_lookup(walk_state->scope_info, path,
184 object_type, ACPI_IMODE_LOAD_PASS1, 184 object_type, ACPI_IMODE_LOAD_PASS1,
185 ACPI_NS_SEARCH_PARENT, walk_state, 185 ACPI_NS_SEARCH_PARENT, walk_state,
186 &(node)); 186 &node);
187 } 187 }
188#endif 188#endif
189 if (ACPI_FAILURE(status)) { 189 if (ACPI_FAILURE(status)) {
@@ -301,10 +301,41 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
301 status = 301 status =
302 acpi_ns_lookup(walk_state->scope_info, path, object_type, 302 acpi_ns_lookup(walk_state->scope_info, path, object_type,
303 ACPI_IMODE_LOAD_PASS1, flags, walk_state, 303 ACPI_IMODE_LOAD_PASS1, flags, walk_state,
304 &(node)); 304 &node);
305 if (ACPI_FAILURE(status)) { 305 if (ACPI_FAILURE(status)) {
306 ACPI_ERROR_NAMESPACE(path, status); 306 if (status == AE_ALREADY_EXISTS) {
307 return_ACPI_STATUS(status); 307
308 /* The name already exists in this scope */
309
310 if (node->flags & ANOBJ_IS_EXTERNAL) {
311 /*
312 * Allow one create on an object or segment that was
313 * previously declared External
314 */
315 node->flags &= ~ANOBJ_IS_EXTERNAL;
316 node->type = (u8) object_type;
317
318 /* Just retyped a node, probably will need to open a scope */
319
320 if (acpi_ns_opens_scope(object_type)) {
321 status =
322 acpi_ds_scope_stack_push
323 (node, object_type,
324 walk_state);
325 if (ACPI_FAILURE(status)) {
326 return_ACPI_STATUS
327 (status);
328 }
329 }
330 status = AE_OK;
331 }
332 }
333
334 if (ACPI_FAILURE(status)) {
335
336 ACPI_ERROR_NAMESPACE(path, status);
337 return_ACPI_STATUS(status);
338 }
308 } 339 }
309 break; 340 break;
310 } 341 }