Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 28eb3fcf authored by Lin Ming's avatar Lin Ming Committed by Len Brown
Browse files

ACPICA: Make acpi_thread_id no longer configurable, always u64



Change definition of acpi_thread_id to always be a u64. This
simplifies the code, especially any printf output. u64 is
the only common data type for all thread_id types across all
operating systems. We now force the OSL to cast the native
thread_id type to u64 before returning the value to ACPICA
(via acpi_os_get_thread_id).

Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 8f40f171
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -121,7 +121,6 @@ acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
				 struct acpi_gpe_block_info *gpe_block,
				 void *context);

#ifdef	ACPI_FUTURE_USAGE
/*
 * hwpci - PCI configuration support
 */
@@ -129,6 +128,7 @@ acpi_status
acpi_hw_derive_pci_id(struct acpi_pci_id *pci_id,
		      acpi_handle root_pci_device, acpi_handle pci_region);

#ifdef	ACPI_FUTURE_USAGE
/*
 * hwtimer - ACPI Timer prototypes
 */
+1 −1
Original line number Diff line number Diff line
@@ -1001,7 +1001,7 @@ struct acpi_port_info {
struct acpi_db_method_info {
	acpi_handle main_thread_gate;
	acpi_handle thread_complete_gate;
	u32 *threads;
	acpi_thread_id *threads;
	u32 num_threads;
	u32 num_created;
	u32 num_completed;
+1 −1
Original line number Diff line number Diff line
@@ -573,7 +573,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,

				acpi_os_release_mutex(method_desc->method.
						      mutex->mutex.os_mutex);
				method_desc->method.mutex->mutex.thread_id = NULL;
				method_desc->method.mutex->mutex.thread_id = 0;
			}
		}

+1 −1
Original line number Diff line number Diff line
@@ -553,7 +553,7 @@ acpi_status acpi_ev_release_global_lock(void)
	acpi_gbl_global_lock_acquired = FALSE;

	/* Release the local GL mutex */
	acpi_ev_global_lock_thread_id = NULL;
	acpi_ev_global_lock_thread_id = 0;
	acpi_ev_global_lock_acquired = 0;
	acpi_os_release_mutex(acpi_gbl_global_lock_mutex->mutex.os_mutex);
	return_ACPI_STATUS(status);
+5 −5
Original line number Diff line number Diff line
@@ -336,7 +336,7 @@ acpi_status acpi_ex_release_mutex_object(union acpi_operand_object *obj_desc)

	/* Clear mutex info */

	obj_desc->mutex.thread_id = NULL;
	obj_desc->mutex.thread_id = 0;
	return_ACPI_STATUS(status);
}

@@ -393,10 +393,10 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
	if ((owner_thread->thread_id != walk_state->thread->thread_id) &&
	    (obj_desc != acpi_gbl_global_lock_mutex)) {
		ACPI_ERROR((AE_INFO,
			    "Thread %p cannot release Mutex [%4.4s] acquired by thread %p",
			    ACPI_CAST_PTR(void, walk_state->thread->thread_id),
			    "Thread %u cannot release Mutex [%4.4s] acquired by thread %u",
			    (u32)walk_state->thread->thread_id,
			    acpi_ut_get_node_name(obj_desc->mutex.node),
			    ACPI_CAST_PTR(void, owner_thread->thread_id)));
			    (u32)owner_thread->thread_id));
		return_ACPI_STATUS(AE_AML_NOT_OWNER);
	}

@@ -488,7 +488,7 @@ void acpi_ex_release_all_mutexes(struct acpi_thread_state *thread)
		/* Mark mutex unowned */

		obj_desc->mutex.owner_thread = NULL;
		obj_desc->mutex.thread_id = NULL;
		obj_desc->mutex.thread_id = 0;

		/* Update Thread sync_level (Last mutex is the important one) */

Loading