Loading drivers/acpi/events/evmisc.c +6 −2 Original line number Original line Diff line number Diff line Loading @@ -196,11 +196,15 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node, notify_info->notify.value = (u16) notify_value; notify_info->notify.value = (u16) notify_value; notify_info->notify.handler_obj = handler_obj; notify_info->notify.handler_obj = handler_obj; acpi_ex_relinquish_interpreter(); acpi_ex_exit_interpreter(); acpi_ev_notify_dispatch(notify_info); acpi_ev_notify_dispatch(notify_info); acpi_ex_reacquire_interpreter(); status = acpi_ex_enter_interpreter(); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } } } if (!handler_obj) { if (!handler_obj) { Loading drivers/acpi/events/evregion.c +11 −4 Original line number Original line Diff line number Diff line Loading @@ -291,6 +291,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, u32 bit_width, acpi_integer * value) u32 bit_width, acpi_integer * value) { { acpi_status status; acpi_status status; acpi_status status2; acpi_adr_space_handler handler; acpi_adr_space_handler handler; acpi_adr_space_setup region_setup; acpi_adr_space_setup region_setup; union acpi_operand_object *handler_desc; union acpi_operand_object *handler_desc; Loading Loading @@ -344,7 +345,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, * setup will potentially execute control methods * setup will potentially execute control methods * (e.g., _REG method for this region) * (e.g., _REG method for this region) */ */ acpi_ex_relinquish_interpreter(); acpi_ex_exit_interpreter(); status = region_setup(region_obj, ACPI_REGION_ACTIVATE, status = region_setup(region_obj, ACPI_REGION_ACTIVATE, handler_desc->address_space.context, handler_desc->address_space.context, Loading @@ -352,7 +353,10 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, /* Re-enter the interpreter */ /* Re-enter the interpreter */ acpi_ex_reacquire_interpreter(); status2 = acpi_ex_enter_interpreter(); if (ACPI_FAILURE(status2)) { return_ACPI_STATUS(status2); } /* Check for failure of the Region Setup */ /* Check for failure of the Region Setup */ Loading Loading @@ -405,7 +409,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, * exit the interpreter because the handler *might* block -- we don't * exit the interpreter because the handler *might* block -- we don't * know what it will do, so we can't hold the lock on the intepreter. * know what it will do, so we can't hold the lock on the intepreter. */ */ acpi_ex_relinquish_interpreter(); acpi_ex_exit_interpreter(); } } /* Call the handler */ /* Call the handler */ Loading @@ -426,7 +430,10 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, * We just returned from a non-default handler, we must re-enter the * We just returned from a non-default handler, we must re-enter the * interpreter * interpreter */ */ acpi_ex_reacquire_interpreter(); status2 = acpi_ex_enter_interpreter(); if (ACPI_FAILURE(status2)) { return_ACPI_STATUS(status2); } } } return_ACPI_STATUS(status); return_ACPI_STATUS(status); Loading drivers/acpi/events/evxface.c +4 −2 Original line number Original line Diff line number Diff line Loading @@ -768,9 +768,11 @@ acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle) return (AE_BAD_PARAMETER); return (AE_BAD_PARAMETER); } } /* Must lock interpreter to prevent race conditions */ status = acpi_ex_enter_interpreter(); if (ACPI_FAILURE(status)) { return (status); } acpi_ex_enter_interpreter(); status = acpi_ev_acquire_global_lock(timeout); status = acpi_ev_acquire_global_lock(timeout); acpi_ex_exit_interpreter(); acpi_ex_exit_interpreter(); Loading drivers/acpi/executer/excreate.c +4 −1 Original line number Original line Diff line number Diff line Loading @@ -583,7 +583,10 @@ acpi_ex_create_method(u8 * aml_start, * Get the sync_level. If method is serialized, a mutex will be * Get the sync_level. If method is serialized, a mutex will be * created for this method when it is parsed. * created for this method when it is parsed. */ */ if (method_flags & AML_METHOD_SERIALIZED) { if (acpi_gbl_all_methods_serialized) { obj_desc->method.sync_level = 0; obj_desc->method.method_flags |= AML_METHOD_SERIALIZED; } else if (method_flags & AML_METHOD_SERIALIZED) { /* /* * ACPI 1.0: sync_level = 0 * ACPI 1.0: sync_level = 0 * ACPI 2.0: sync_level = sync_level in method declaration * ACPI 2.0: sync_level = sync_level in method declaration Loading drivers/acpi/executer/exsystem.c +23 −7 Original line number Original line Diff line number Diff line Loading @@ -66,6 +66,7 @@ ACPI_MODULE_NAME("exsystem") acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) { { acpi_status status; acpi_status status; acpi_status status2; ACPI_FUNCTION_TRACE(ex_system_wait_semaphore); ACPI_FUNCTION_TRACE(ex_system_wait_semaphore); Loading @@ -78,7 +79,7 @@ acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) /* We must wait, so unlock the interpreter */ /* We must wait, so unlock the interpreter */ acpi_ex_relinquish_interpreter(); acpi_ex_exit_interpreter(); status = acpi_os_wait_semaphore(semaphore, 1, timeout); status = acpi_os_wait_semaphore(semaphore, 1, timeout); Loading @@ -88,7 +89,13 @@ acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) /* Reacquire the interpreter */ /* Reacquire the interpreter */ acpi_ex_reacquire_interpreter(); status2 = acpi_ex_enter_interpreter(); if (ACPI_FAILURE(status2)) { /* Report fatal error, could not acquire interpreter */ return_ACPI_STATUS(status2); } } } return_ACPI_STATUS(status); return_ACPI_STATUS(status); Loading @@ -112,6 +119,7 @@ acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout) acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout) { { acpi_status status; acpi_status status; acpi_status status2; ACPI_FUNCTION_TRACE(ex_system_wait_mutex); ACPI_FUNCTION_TRACE(ex_system_wait_mutex); Loading @@ -124,7 +132,7 @@ acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout) /* We must wait, so unlock the interpreter */ /* We must wait, so unlock the interpreter */ acpi_ex_relinquish_interpreter(); acpi_ex_exit_interpreter(); status = acpi_os_acquire_mutex(mutex, timeout); status = acpi_os_acquire_mutex(mutex, timeout); Loading @@ -134,7 +142,13 @@ acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout) /* Reacquire the interpreter */ /* Reacquire the interpreter */ acpi_ex_reacquire_interpreter(); status2 = acpi_ex_enter_interpreter(); if (ACPI_FAILURE(status2)) { /* Report fatal error, could not acquire interpreter */ return_ACPI_STATUS(status2); } } } return_ACPI_STATUS(status); return_ACPI_STATUS(status); Loading Loading @@ -195,18 +209,20 @@ acpi_status acpi_ex_system_do_stall(u32 how_long) acpi_status acpi_ex_system_do_suspend(acpi_integer how_long) acpi_status acpi_ex_system_do_suspend(acpi_integer how_long) { { acpi_status status; ACPI_FUNCTION_ENTRY(); ACPI_FUNCTION_ENTRY(); /* Since this thread will sleep, we must release the interpreter */ /* Since this thread will sleep, we must release the interpreter */ acpi_ex_relinquish_interpreter(); acpi_ex_exit_interpreter(); acpi_os_sleep(how_long); acpi_os_sleep(how_long); /* And now we must get the interpreter again */ /* And now we must get the interpreter again */ acpi_ex_reacquire_interpreter(); status = acpi_ex_enter_interpreter(); return (AE_OK); return (status); } } /******************************************************************************* /******************************************************************************* Loading Loading
drivers/acpi/events/evmisc.c +6 −2 Original line number Original line Diff line number Diff line Loading @@ -196,11 +196,15 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node, notify_info->notify.value = (u16) notify_value; notify_info->notify.value = (u16) notify_value; notify_info->notify.handler_obj = handler_obj; notify_info->notify.handler_obj = handler_obj; acpi_ex_relinquish_interpreter(); acpi_ex_exit_interpreter(); acpi_ev_notify_dispatch(notify_info); acpi_ev_notify_dispatch(notify_info); acpi_ex_reacquire_interpreter(); status = acpi_ex_enter_interpreter(); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } } } if (!handler_obj) { if (!handler_obj) { Loading
drivers/acpi/events/evregion.c +11 −4 Original line number Original line Diff line number Diff line Loading @@ -291,6 +291,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, u32 bit_width, acpi_integer * value) u32 bit_width, acpi_integer * value) { { acpi_status status; acpi_status status; acpi_status status2; acpi_adr_space_handler handler; acpi_adr_space_handler handler; acpi_adr_space_setup region_setup; acpi_adr_space_setup region_setup; union acpi_operand_object *handler_desc; union acpi_operand_object *handler_desc; Loading Loading @@ -344,7 +345,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, * setup will potentially execute control methods * setup will potentially execute control methods * (e.g., _REG method for this region) * (e.g., _REG method for this region) */ */ acpi_ex_relinquish_interpreter(); acpi_ex_exit_interpreter(); status = region_setup(region_obj, ACPI_REGION_ACTIVATE, status = region_setup(region_obj, ACPI_REGION_ACTIVATE, handler_desc->address_space.context, handler_desc->address_space.context, Loading @@ -352,7 +353,10 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, /* Re-enter the interpreter */ /* Re-enter the interpreter */ acpi_ex_reacquire_interpreter(); status2 = acpi_ex_enter_interpreter(); if (ACPI_FAILURE(status2)) { return_ACPI_STATUS(status2); } /* Check for failure of the Region Setup */ /* Check for failure of the Region Setup */ Loading Loading @@ -405,7 +409,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, * exit the interpreter because the handler *might* block -- we don't * exit the interpreter because the handler *might* block -- we don't * know what it will do, so we can't hold the lock on the intepreter. * know what it will do, so we can't hold the lock on the intepreter. */ */ acpi_ex_relinquish_interpreter(); acpi_ex_exit_interpreter(); } } /* Call the handler */ /* Call the handler */ Loading @@ -426,7 +430,10 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, * We just returned from a non-default handler, we must re-enter the * We just returned from a non-default handler, we must re-enter the * interpreter * interpreter */ */ acpi_ex_reacquire_interpreter(); status2 = acpi_ex_enter_interpreter(); if (ACPI_FAILURE(status2)) { return_ACPI_STATUS(status2); } } } return_ACPI_STATUS(status); return_ACPI_STATUS(status); Loading
drivers/acpi/events/evxface.c +4 −2 Original line number Original line Diff line number Diff line Loading @@ -768,9 +768,11 @@ acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle) return (AE_BAD_PARAMETER); return (AE_BAD_PARAMETER); } } /* Must lock interpreter to prevent race conditions */ status = acpi_ex_enter_interpreter(); if (ACPI_FAILURE(status)) { return (status); } acpi_ex_enter_interpreter(); status = acpi_ev_acquire_global_lock(timeout); status = acpi_ev_acquire_global_lock(timeout); acpi_ex_exit_interpreter(); acpi_ex_exit_interpreter(); Loading
drivers/acpi/executer/excreate.c +4 −1 Original line number Original line Diff line number Diff line Loading @@ -583,7 +583,10 @@ acpi_ex_create_method(u8 * aml_start, * Get the sync_level. If method is serialized, a mutex will be * Get the sync_level. If method is serialized, a mutex will be * created for this method when it is parsed. * created for this method when it is parsed. */ */ if (method_flags & AML_METHOD_SERIALIZED) { if (acpi_gbl_all_methods_serialized) { obj_desc->method.sync_level = 0; obj_desc->method.method_flags |= AML_METHOD_SERIALIZED; } else if (method_flags & AML_METHOD_SERIALIZED) { /* /* * ACPI 1.0: sync_level = 0 * ACPI 1.0: sync_level = 0 * ACPI 2.0: sync_level = sync_level in method declaration * ACPI 2.0: sync_level = sync_level in method declaration Loading
drivers/acpi/executer/exsystem.c +23 −7 Original line number Original line Diff line number Diff line Loading @@ -66,6 +66,7 @@ ACPI_MODULE_NAME("exsystem") acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) { { acpi_status status; acpi_status status; acpi_status status2; ACPI_FUNCTION_TRACE(ex_system_wait_semaphore); ACPI_FUNCTION_TRACE(ex_system_wait_semaphore); Loading @@ -78,7 +79,7 @@ acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) /* We must wait, so unlock the interpreter */ /* We must wait, so unlock the interpreter */ acpi_ex_relinquish_interpreter(); acpi_ex_exit_interpreter(); status = acpi_os_wait_semaphore(semaphore, 1, timeout); status = acpi_os_wait_semaphore(semaphore, 1, timeout); Loading @@ -88,7 +89,13 @@ acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) /* Reacquire the interpreter */ /* Reacquire the interpreter */ acpi_ex_reacquire_interpreter(); status2 = acpi_ex_enter_interpreter(); if (ACPI_FAILURE(status2)) { /* Report fatal error, could not acquire interpreter */ return_ACPI_STATUS(status2); } } } return_ACPI_STATUS(status); return_ACPI_STATUS(status); Loading @@ -112,6 +119,7 @@ acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout) acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout) { { acpi_status status; acpi_status status; acpi_status status2; ACPI_FUNCTION_TRACE(ex_system_wait_mutex); ACPI_FUNCTION_TRACE(ex_system_wait_mutex); Loading @@ -124,7 +132,7 @@ acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout) /* We must wait, so unlock the interpreter */ /* We must wait, so unlock the interpreter */ acpi_ex_relinquish_interpreter(); acpi_ex_exit_interpreter(); status = acpi_os_acquire_mutex(mutex, timeout); status = acpi_os_acquire_mutex(mutex, timeout); Loading @@ -134,7 +142,13 @@ acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout) /* Reacquire the interpreter */ /* Reacquire the interpreter */ acpi_ex_reacquire_interpreter(); status2 = acpi_ex_enter_interpreter(); if (ACPI_FAILURE(status2)) { /* Report fatal error, could not acquire interpreter */ return_ACPI_STATUS(status2); } } } return_ACPI_STATUS(status); return_ACPI_STATUS(status); Loading Loading @@ -195,18 +209,20 @@ acpi_status acpi_ex_system_do_stall(u32 how_long) acpi_status acpi_ex_system_do_suspend(acpi_integer how_long) acpi_status acpi_ex_system_do_suspend(acpi_integer how_long) { { acpi_status status; ACPI_FUNCTION_ENTRY(); ACPI_FUNCTION_ENTRY(); /* Since this thread will sleep, we must release the interpreter */ /* Since this thread will sleep, we must release the interpreter */ acpi_ex_relinquish_interpreter(); acpi_ex_exit_interpreter(); acpi_os_sleep(how_long); acpi_os_sleep(how_long); /* And now we must get the interpreter again */ /* And now we must get the interpreter again */ acpi_ex_reacquire_interpreter(); status = acpi_ex_enter_interpreter(); return (AE_OK); return (status); } } /******************************************************************************* /******************************************************************************* Loading