diff options
author | Bob Moore <robert.moore@intel.com> | 2006-05-12 17:12:00 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-06-14 02:34:48 -0400 |
commit | 958dd242b691f64ab4632b4903dbb1e16fee8269 (patch) | |
tree | ddf4932fb4e3023dd0d1914571f17f2e3b03978d /drivers/acpi/dispatcher/dsmethod.c | |
parent | b229cf92eee616c7cb5ad8cdb35a19b119f00bc8 (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/dsmethod.c')
-rw-r--r-- | drivers/acpi/dispatcher/dsmethod.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c index 651f2b68531b..e348db0e541e 100644 --- a/drivers/acpi/dispatcher/dsmethod.c +++ b/drivers/acpi/dispatcher/dsmethod.c | |||
@@ -385,6 +385,7 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state, | |||
385 | union acpi_operand_object *return_desc) | 385 | union acpi_operand_object *return_desc) |
386 | { | 386 | { |
387 | acpi_status status; | 387 | acpi_status status; |
388 | int same_as_implicit_return; | ||
388 | 389 | ||
389 | ACPI_FUNCTION_TRACE_PTR(ds_restart_control_method, walk_state); | 390 | ACPI_FUNCTION_TRACE_PTR(ds_restart_control_method, walk_state); |
390 | 391 | ||
@@ -402,6 +403,11 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state, | |||
402 | 403 | ||
403 | if (return_desc) { | 404 | if (return_desc) { |
404 | 405 | ||
406 | /* Is the implicit return object the same as the return desc? */ | ||
407 | |||
408 | same_as_implicit_return = | ||
409 | (walk_state->implicit_return_obj == return_desc); | ||
410 | |||
405 | /* Are we actually going to use the return value? */ | 411 | /* Are we actually going to use the return value? */ |
406 | 412 | ||
407 | if (walk_state->return_used) { | 413 | if (walk_state->return_used) { |
@@ -422,18 +428,23 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state, | |||
422 | } | 428 | } |
423 | 429 | ||
424 | /* | 430 | /* |
425 | * The following code is the | 431 | * The following code is the optional support for the so-called |
426 | * optional support for a so-called "implicit return". Some AML code | 432 | * "implicit return". Some AML code assumes that the last value of the |
427 | * assumes that the last value of the method is "implicitly" returned | 433 | * method is "implicitly" returned to the caller, in the absence of an |
428 | * to the caller. Just save the last result as the return value. | 434 | * explicit return value. |
435 | * | ||
436 | * Just save the last result of the method as the return value. | ||
437 | * | ||
429 | * NOTE: this is optional because the ASL language does not actually | 438 | * NOTE: this is optional because the ASL language does not actually |
430 | * support this behavior. | 439 | * support this behavior. |
431 | */ | 440 | */ |
432 | else if (!acpi_ds_do_implicit_return | 441 | else if (!acpi_ds_do_implicit_return |
433 | (return_desc, walk_state, FALSE)) { | 442 | (return_desc, walk_state, FALSE) |
443 | || same_as_implicit_return) { | ||
434 | /* | 444 | /* |
435 | * Delete the return value if it will not be used by the | 445 | * Delete the return value if it will not be used by the |
436 | * calling method | 446 | * calling method or remove one reference if the explicit return |
447 | * is the same as the implicit return value. | ||
437 | */ | 448 | */ |
438 | acpi_ut_remove_reference(return_desc); | 449 | acpi_ut_remove_reference(return_desc); |
439 | } | 450 | } |