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

Commit 4c90ece2 authored by Bob Moore's avatar Bob Moore Committed by Len Brown
Browse files

ACPI: ACPICA 20060608

Converted the locking mutex used for the ACPI hardware
to a spinlock. This change should eliminate all problems
caused by attempting to acquire a semaphore at interrupt
level, and it means that all ACPICA external interfaces
that directly access the ACPI hardware can be safely
called from interrupt level.

Fixed a regression introduced in 20060526 where the ACPI
device initialization could be prematurely aborted with
an AE_NOT_FOUND if a device did not have an optional
_INI method.

Fixed an IndexField issue where a write to the Data
Register should be limited in size to the AccessSize
(width) of the IndexField itself. (BZ 433, Fiodor Suietov)

Fixed problem reports (Valery Podrezov) integrated: - Allow
store of ThermalZone objects to Debug object.
http://bugzilla.kernel.org/show_bug.cgi?id=5369
http://bugzilla.kernel.org/show_bug.cgi?id=5370



Fixed problem reports (Fiodor Suietov) integrated: -
acpi_get_table_header() doesn't handle multiple instances
correctly (BZ 364)

Removed four global mutexes that were obsolete and were
no longer being used.

Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 4119532c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -507,7 +507,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
	 * If this is the last thread executing the method,
	 * we have additional cleanup to perform
	 */
	status = acpi_ut_acquire_mutex(ACPI_MTX_PARSER);
	status = acpi_ut_acquire_mutex(ACPI_MTX_CONTROL_METHOD);
	if (ACPI_FAILURE(status)) {
		return_VOID;
	}
@@ -600,7 +600,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
	}

      exit:
	(void)acpi_ut_release_mutex(ACPI_MTX_PARSER);
	(void)acpi_ut_release_mutex(ACPI_MTX_CONTROL_METHOD);
	return_VOID;
}

+13 −4
Original line number Diff line number Diff line
@@ -382,6 +382,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
	u32 status_reg;
	u32 enable_reg;
	acpi_cpu_flags flags;
	acpi_cpu_flags hw_flags;
	acpi_native_uint i;
	acpi_native_uint j;

@@ -393,9 +394,12 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
		return (int_status);
	}

	/* Examine all GPE blocks attached to this interrupt level */
	/* We need to hold the GPE lock now, hardware lock in the loop */

	flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);

	/* Examine all GPE blocks attached to this interrupt level */

	gpe_block = gpe_xrupt_list->gpe_block_list_head;
	while (gpe_block) {
		/*
@@ -409,6 +413,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)

			gpe_register_info = &gpe_block->register_info[i];

			hw_flags = acpi_os_acquire_lock(acpi_gbl_hardware_lock);

			/* Read the Status Register */

			status =
@@ -417,6 +423,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
						   &gpe_register_info->
						   status_address);
			if (ACPI_FAILURE(status)) {
				acpi_os_release_lock(acpi_gbl_hardware_lock,
						     hw_flags);
				goto unlock_and_exit;
			}

@@ -427,6 +435,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
						   &enable_reg,
						   &gpe_register_info->
						   enable_address);
			acpi_os_release_lock(acpi_gbl_hardware_lock, hw_flags);

			if (ACPI_FAILURE(status)) {
				goto unlock_and_exit;
			}
@@ -499,7 +509,6 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
{
	struct acpi_gpe_event_info *gpe_event_info = (void *)context;
	u32 gpe_number = 0;
	acpi_status status;
	struct acpi_gpe_event_info local_gpe_event_info;
	struct acpi_evaluate_info *info;
@@ -565,10 +574,10 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)

		if (ACPI_FAILURE(status)) {
			ACPI_EXCEPTION((AE_INFO, status,
					"While evaluating method [%4.4s] for GPE[%2X]",
					"While evaluating GPE method [%4.4s]",
					acpi_ut_get_node_name
					(local_gpe_event_info.dispatch.
					 method_node), gpe_number));
					 method_node)));
		}
	}

+6 −2
Original line number Diff line number Diff line
@@ -785,6 +785,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
{
	acpi_status status;
	acpi_integer mask;
	acpi_integer width_mask;
	acpi_integer merged_datum;
	acpi_integer raw_datum = 0;
	u32 field_offset = 0;
@@ -809,8 +810,11 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,

	/* Compute the number of datums (access width data items) */

	width_mask =
	    ACPI_MASK_BITS_ABOVE(obj_desc->common_field.access_bit_width);
	mask =
	    ACPI_MASK_BITS_BELOW(obj_desc->common_field.start_field_bit_offset);
	    width_mask & ACPI_MASK_BITS_BELOW(obj_desc->common_field.
					      start_field_bit_offset);

	datum_count = ACPI_ROUND_UP_TO(obj_desc->common_field.bit_length,
				       obj_desc->common_field.access_bit_width);
@@ -850,7 +854,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
		merged_datum = raw_datum >>
		    (obj_desc->common_field.access_bit_width -
		     obj_desc->common_field.start_field_bit_offset);
		mask = ACPI_INTEGER_MAX;
		mask = width_mask;

		if (i == datum_count) {
			break;
+5 −5
Original line number Diff line number Diff line
@@ -322,8 +322,9 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)

			/* Since the bit position is one-based, subtract from 33 (65) */

			return_desc->integer.value = temp32 == 0 ? 0 :
			    (ACPI_INTEGER_BIT_SIZE + 1) - temp32;
			return_desc->integer.value =
			    temp32 ==
			    0 ? 0 : (ACPI_INTEGER_BIT_SIZE + 1) - temp32;
			break;

		case AML_FROM_BCD_OP:	/* from_bcd (BCDValue, Result) */
@@ -698,6 +699,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
		if (ACPI_FAILURE(status)) {
			goto cleanup;
		}

		/* Allocate a descriptor to hold the type. */

		return_desc = acpi_ut_create_internal_object(ACPI_TYPE_INTEGER);
@@ -967,7 +969,6 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
						acpi_ut_add_reference
						    (return_desc);
					}

					break;

				default:
@@ -987,7 +988,6 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)

				if (ACPI_GET_DESCRIPTOR_TYPE(return_desc) ==
				    ACPI_DESC_TYPE_NAMED) {

					return_desc =
					    acpi_ns_get_attached_object((struct
									 acpi_namespace_node
@@ -1002,7 +1002,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)

			default:
				ACPI_ERROR((AE_INFO,
					    "Unknown opcode in ref(%p) - %X",
					    "Unknown opcode in reference(%p) - %X",
					    operand[0],
					    operand[0]->reference.opcode));

+3 −3
Original line number Diff line number Diff line
@@ -114,10 +114,11 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,

	/*
	 * Several object types require no further processing:
	 * 1) Devices rarely have an attached object, return the Node
	 * 1) Device/Thermal objects don't have a "real" subobject, return the Node
	 * 2) Method locals and arguments have a pseudo-Node
	 */
	if (entry_type == ACPI_TYPE_DEVICE ||
	if ((entry_type == ACPI_TYPE_DEVICE) ||
	    (entry_type == ACPI_TYPE_THERMAL) ||
	    (node->flags & (ANOBJ_METHOD_ARG | ANOBJ_METHOD_LOCAL))) {
		return_ACPI_STATUS(AE_OK);
	}
@@ -216,7 +217,6 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr,
	case ACPI_TYPE_METHOD:
	case ACPI_TYPE_POWER:
	case ACPI_TYPE_PROCESSOR:
	case ACPI_TYPE_THERMAL:
	case ACPI_TYPE_EVENT:
	case ACPI_TYPE_REGION:

Loading