diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-10 16:30:34 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-10 16:30:34 -0400 |
| commit | b526ca438b95a6d71210e0ffc79aabac8aba2b1e (patch) | |
| tree | 7b162fa7d99405c5ad0110b6f4a4db05ff9e48d5 /drivers/acpi/dispatcher/dsmethod.c | |
| parent | 9b6a51746ffe8d619f1097675d2dc5e303470024 (diff) | |
| parent | f685648e7d6520653fa2641840cccc58ba8ef8e0 (diff) | |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
acpi,msi-laptop: Fall back to EC polling mode for MSI laptop specific EC commands
sony-laptop: rename SONY_LAPTOP_OLD to a more meaningful SONYPI_COMPAT
asus-laptop: version bump and lindent
asus-laptop: fix light sens init
asus-laptop: add GPS support
asus-laptop: notify ALL events
ACPICA: Lindent
ACPI: created a dedicated workqueue for notify() execution
Revert "ACPICA: fix AML mutex re-entrancy"
Revert "Execute AML Notify() requests on stack."
Revert "ACPICA: revert "acpi_serialize" changes"
ACPI: delete un-reliable concept of cooling mode
ACPI: thermal trip points are read-only
Diffstat (limited to 'drivers/acpi/dispatcher/dsmethod.c')
| -rw-r--r-- | drivers/acpi/dispatcher/dsmethod.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c index 1683e5c5b94c..1cbe61905824 100644 --- a/drivers/acpi/dispatcher/dsmethod.c +++ b/drivers/acpi/dispatcher/dsmethod.c | |||
| @@ -231,8 +231,10 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node, | |||
| 231 | * Obtain the method mutex if necessary. Do not acquire mutex for a | 231 | * Obtain the method mutex if necessary. Do not acquire mutex for a |
| 232 | * recursive call. | 232 | * recursive call. |
| 233 | */ | 233 | */ |
| 234 | if (acpi_os_get_thread_id() != | 234 | if (!walk_state || |
| 235 | obj_desc->method.mutex->mutex.owner_thread_id) { | 235 | !obj_desc->method.mutex->mutex.owner_thread || |
| 236 | (walk_state->thread != | ||
| 237 | obj_desc->method.mutex->mutex.owner_thread)) { | ||
| 236 | /* | 238 | /* |
| 237 | * Acquire the method mutex. This releases the interpreter if we | 239 | * Acquire the method mutex. This releases the interpreter if we |
| 238 | * block (and reacquires it before it returns) | 240 | * block (and reacquires it before it returns) |
| @@ -246,14 +248,14 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node, | |||
| 246 | } | 248 | } |
| 247 | 249 | ||
| 248 | /* Update the mutex and walk info and save the original sync_level */ | 250 | /* Update the mutex and walk info and save the original sync_level */ |
| 249 | obj_desc->method.mutex->mutex.owner_thread_id = | ||
| 250 | acpi_os_get_thread_id(); | ||
| 251 | 251 | ||
| 252 | if (walk_state) { | 252 | if (walk_state) { |
| 253 | obj_desc->method.mutex->mutex. | 253 | obj_desc->method.mutex->mutex. |
| 254 | original_sync_level = | 254 | original_sync_level = |
| 255 | walk_state->thread->current_sync_level; | 255 | walk_state->thread->current_sync_level; |
| 256 | 256 | ||
| 257 | obj_desc->method.mutex->mutex.owner_thread = | ||
| 258 | walk_state->thread; | ||
| 257 | walk_state->thread->current_sync_level = | 259 | walk_state->thread->current_sync_level = |
| 258 | obj_desc->method.sync_level; | 260 | obj_desc->method.sync_level; |
| 259 | } else { | 261 | } else { |
| @@ -567,7 +569,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc, | |||
| 567 | 569 | ||
| 568 | acpi_os_release_mutex(method_desc->method.mutex->mutex. | 570 | acpi_os_release_mutex(method_desc->method.mutex->mutex. |
| 569 | os_mutex); | 571 | os_mutex); |
| 570 | method_desc->method.mutex->mutex.owner_thread_id = ACPI_MUTEX_NOT_ACQUIRED; | 572 | method_desc->method.mutex->mutex.owner_thread = NULL; |
| 571 | } | 573 | } |
| 572 | } | 574 | } |
| 573 | 575 | ||
