Loading drivers/acpi/events/evxface.c +1 −1 Original line number Diff line number Diff line Loading @@ -816,7 +816,7 @@ acpi_status acpi_release_global_lock(u32 handle) { acpi_status status; if (handle != acpi_gbl_global_lock_handle) { if (!handle || (handle != acpi_gbl_global_lock_handle)) { return (AE_NOT_ACQUIRED); } Loading drivers/acpi/executer/exfield.c +4 −4 Original line number Diff line number Diff line Loading @@ -122,7 +122,7 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state, buffer.pointer), ACPI_READ | (obj_desc->field. attribute << 16)); acpi_ex_release_global_lock(); acpi_ex_release_global_lock(obj_desc->common_field.field_flags); goto exit; } Loading Loading @@ -177,7 +177,7 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state, /* Read from the field */ status = acpi_ex_extract_from_field(obj_desc, buffer, (u32) length); acpi_ex_release_global_lock(); acpi_ex_release_global_lock(obj_desc->common_field.field_flags); exit: if (ACPI_FAILURE(status)) { Loading Loading @@ -284,7 +284,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, (acpi_integer *) buffer, ACPI_WRITE | (obj_desc->field. attribute << 16)); acpi_ex_release_global_lock(); acpi_ex_release_global_lock(obj_desc->common_field.field_flags); *result_desc = buffer_desc; return_ACPI_STATUS(status); Loading Loading @@ -364,7 +364,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, /* Write to the field */ status = acpi_ex_insert_into_field(obj_desc, buffer, length); acpi_ex_release_global_lock(); acpi_ex_release_global_lock(obj_desc->common_field.field_flags); /* Free temporary buffer if we used one */ Loading drivers/acpi/executer/exmutex.c +18 −5 Original line number Diff line number Diff line Loading @@ -156,6 +156,10 @@ acpi_ex_acquire_mutex_object(u16 timeout, ACPI_FUNCTION_TRACE_PTR(ex_acquire_mutex_object, obj_desc); if (!obj_desc) { return_ACPI_STATUS(AE_BAD_PARAMETER); } /* Support for multiple acquires by the owning thread */ if (obj_desc->mutex.thread_id == thread_id) { Loading Loading @@ -290,6 +294,10 @@ acpi_status acpi_ex_release_mutex_object(union acpi_operand_object *obj_desc) ACPI_FUNCTION_TRACE(ex_release_mutex_object); if (obj_desc->mutex.acquisition_depth == 0) { return (AE_NOT_ACQUIRED); } /* Match multiple Acquires with multiple Releases */ obj_desc->mutex.acquisition_depth--; Loading Loading @@ -387,17 +395,22 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc, */ if (obj_desc->mutex.sync_level > walk_state->thread->current_sync_level) { ACPI_ERROR((AE_INFO, "Cannot release Mutex [%4.4s], incorrect SyncLevel", acpi_ut_get_node_name(obj_desc->mutex.node))); "Cannot release Mutex [%4.4s], SyncLevel mismatch: mutex %d current %d", acpi_ut_get_node_name(obj_desc->mutex.node), obj_desc->mutex.sync_level, walk_state->thread->current_sync_level)); return_ACPI_STATUS(AE_AML_MUTEX_ORDER); } status = acpi_ex_release_mutex_object(obj_desc); if (obj_desc->mutex.acquisition_depth == 0) { /* Restore the original sync_level */ walk_state->thread->current_sync_level = obj_desc->mutex.original_sync_level; } return_ACPI_STATUS(status); } Loading drivers/acpi/executer/exutils.c +9 −2 Original line number Diff line number Diff line Loading @@ -278,7 +278,8 @@ void acpi_ex_acquire_global_lock(u32 field_flags) * * FUNCTION: acpi_ex_release_global_lock * * PARAMETERS: None * PARAMETERS: field_flags - Flags with Lock rule: * always_lock or never_lock * * RETURN: None * Loading @@ -286,12 +287,18 @@ void acpi_ex_acquire_global_lock(u32 field_flags) * ******************************************************************************/ void acpi_ex_release_global_lock(void) void acpi_ex_release_global_lock(u32 field_flags) { acpi_status status; ACPI_FUNCTION_TRACE(ex_release_global_lock); /* Only use the lock if the always_lock bit is set */ if (!(field_flags & AML_FIELD_LOCK_RULE_MASK)) { return_VOID; } /* Release the global lock */ status = acpi_ex_release_mutex_object(acpi_gbl_global_lock_mutex); Loading include/acpi/acinterp.h +1 −1 Original line number Diff line number Diff line Loading @@ -464,7 +464,7 @@ void acpi_ex_truncate_for32bit_table(union acpi_operand_object *obj_desc); void acpi_ex_acquire_global_lock(u32 rule); void acpi_ex_release_global_lock(void); void acpi_ex_release_global_lock(u32 rule); void acpi_ex_eisa_id_to_string(u32 numeric_id, char *out_string); Loading Loading
drivers/acpi/events/evxface.c +1 −1 Original line number Diff line number Diff line Loading @@ -816,7 +816,7 @@ acpi_status acpi_release_global_lock(u32 handle) { acpi_status status; if (handle != acpi_gbl_global_lock_handle) { if (!handle || (handle != acpi_gbl_global_lock_handle)) { return (AE_NOT_ACQUIRED); } Loading
drivers/acpi/executer/exfield.c +4 −4 Original line number Diff line number Diff line Loading @@ -122,7 +122,7 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state, buffer.pointer), ACPI_READ | (obj_desc->field. attribute << 16)); acpi_ex_release_global_lock(); acpi_ex_release_global_lock(obj_desc->common_field.field_flags); goto exit; } Loading Loading @@ -177,7 +177,7 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state, /* Read from the field */ status = acpi_ex_extract_from_field(obj_desc, buffer, (u32) length); acpi_ex_release_global_lock(); acpi_ex_release_global_lock(obj_desc->common_field.field_flags); exit: if (ACPI_FAILURE(status)) { Loading Loading @@ -284,7 +284,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, (acpi_integer *) buffer, ACPI_WRITE | (obj_desc->field. attribute << 16)); acpi_ex_release_global_lock(); acpi_ex_release_global_lock(obj_desc->common_field.field_flags); *result_desc = buffer_desc; return_ACPI_STATUS(status); Loading Loading @@ -364,7 +364,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, /* Write to the field */ status = acpi_ex_insert_into_field(obj_desc, buffer, length); acpi_ex_release_global_lock(); acpi_ex_release_global_lock(obj_desc->common_field.field_flags); /* Free temporary buffer if we used one */ Loading
drivers/acpi/executer/exmutex.c +18 −5 Original line number Diff line number Diff line Loading @@ -156,6 +156,10 @@ acpi_ex_acquire_mutex_object(u16 timeout, ACPI_FUNCTION_TRACE_PTR(ex_acquire_mutex_object, obj_desc); if (!obj_desc) { return_ACPI_STATUS(AE_BAD_PARAMETER); } /* Support for multiple acquires by the owning thread */ if (obj_desc->mutex.thread_id == thread_id) { Loading Loading @@ -290,6 +294,10 @@ acpi_status acpi_ex_release_mutex_object(union acpi_operand_object *obj_desc) ACPI_FUNCTION_TRACE(ex_release_mutex_object); if (obj_desc->mutex.acquisition_depth == 0) { return (AE_NOT_ACQUIRED); } /* Match multiple Acquires with multiple Releases */ obj_desc->mutex.acquisition_depth--; Loading Loading @@ -387,17 +395,22 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc, */ if (obj_desc->mutex.sync_level > walk_state->thread->current_sync_level) { ACPI_ERROR((AE_INFO, "Cannot release Mutex [%4.4s], incorrect SyncLevel", acpi_ut_get_node_name(obj_desc->mutex.node))); "Cannot release Mutex [%4.4s], SyncLevel mismatch: mutex %d current %d", acpi_ut_get_node_name(obj_desc->mutex.node), obj_desc->mutex.sync_level, walk_state->thread->current_sync_level)); return_ACPI_STATUS(AE_AML_MUTEX_ORDER); } status = acpi_ex_release_mutex_object(obj_desc); if (obj_desc->mutex.acquisition_depth == 0) { /* Restore the original sync_level */ walk_state->thread->current_sync_level = obj_desc->mutex.original_sync_level; } return_ACPI_STATUS(status); } Loading
drivers/acpi/executer/exutils.c +9 −2 Original line number Diff line number Diff line Loading @@ -278,7 +278,8 @@ void acpi_ex_acquire_global_lock(u32 field_flags) * * FUNCTION: acpi_ex_release_global_lock * * PARAMETERS: None * PARAMETERS: field_flags - Flags with Lock rule: * always_lock or never_lock * * RETURN: None * Loading @@ -286,12 +287,18 @@ void acpi_ex_acquire_global_lock(u32 field_flags) * ******************************************************************************/ void acpi_ex_release_global_lock(void) void acpi_ex_release_global_lock(u32 field_flags) { acpi_status status; ACPI_FUNCTION_TRACE(ex_release_global_lock); /* Only use the lock if the always_lock bit is set */ if (!(field_flags & AML_FIELD_LOCK_RULE_MASK)) { return_VOID; } /* Release the global lock */ status = acpi_ex_release_mutex_object(acpi_gbl_global_lock_mutex); Loading
include/acpi/acinterp.h +1 −1 Original line number Diff line number Diff line Loading @@ -464,7 +464,7 @@ void acpi_ex_truncate_for32bit_table(union acpi_operand_object *obj_desc); void acpi_ex_acquire_global_lock(u32 rule); void acpi_ex_release_global_lock(void); void acpi_ex_release_global_lock(u32 rule); void acpi_ex_eisa_id_to_string(u32 numeric_id, char *out_string); Loading