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

Commit 0f12b15e authored by Len Brown's avatar Len Brown
Browse files

Pull acpica-20060707 into test branch

parents 20b499aa f6dd9221
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -116,16 +116,6 @@ acpi_ds_init_one_object(acpi_handle obj_handle,

	case ACPI_TYPE_METHOD:

		/*
		 * Set the execution data width (32 or 64) based upon the
		 * revision number of the parent ACPI table.
		 * TBD: This is really for possible future support of integer width
		 * on a per-table basis. Currently, we just use a global for the width.
		 */
		if (info->table_desc->pointer->revision == 1) {
			node->flags |= ANOBJ_DATA_WIDTH_32;
		}

		info->method_count++;
		break;

+4 −19
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ acpi_ds_create_method_mutex(union acpi_operand_object *method_desc)
	union acpi_operand_object *mutex_desc;
	acpi_status status;

	ACPI_FUNCTION_NAME(ds_create_method_mutex);
	ACPI_FUNCTION_TRACE(ds_create_method_mutex);

	/* Create the new mutex object */

@@ -493,7 +493,7 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,

	ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
			  "****Restart [%4.4s] Op %p ReturnValueFromCallee %p\n",
			  (char *)&walk_state->method_node->name,
			  acpi_ut_get_node_name(walk_state->method_node),
			  walk_state->method_call_op, return_desc));

	ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
@@ -610,6 +610,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.owner_thread = NULL;
		}
	}

@@ -620,27 +621,11 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
		 */
		method_node = walk_state->method_node;

		/* Lock namespace for possible update */

		status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
		if (ACPI_FAILURE(status)) {
			return_VOID;
		}

		/*
		 * Delete any namespace entries created immediately underneath
		 * the method
		 */
		if (method_node && method_node->child) {
			acpi_ns_delete_namespace_subtree(method_node);
		}

		/*
		 * Delete any namespace entries created anywhere else within
		 * Delete any namespace objects created anywhere within
		 * the namespace by the execution of this method
		 */
		acpi_ns_delete_namespace_by_owner(method_desc->method.owner_id);
		status = acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
	}

	/* Decrement the thread count on the method */
+2 −2
Original line number Diff line number Diff line
@@ -313,10 +313,10 @@ acpi_ds_exec_begin_op(struct acpi_walk_state *walk_state,
	case AML_CLASS_EXECUTE:
	case AML_CLASS_CREATE:
		/*
		 * Most operators with arguments.
		 * Most operators with arguments (except create_xxx_field operators)
		 * Start a new result/operand state
		 */
		if (walk_state->opcode != AML_CREATE_FIELD_OP) {
		if (walk_state->op_info->object_type != ACPI_TYPE_BUFFER_FIELD) {
			status = acpi_ds_result_stack_push(walk_state);
		}
		break;
+25 −19
Original line number Diff line number Diff line
@@ -528,34 +528,40 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj,
				}
			}

			/* Call the setup handler with the deactivate notification */

			/*
			 * If the region has been activated, call the setup handler
			 * with the deactivate notification
			 */
			if (region_obj->region.flags & AOPOBJ_SETUP_COMPLETE) {
				region_setup = handler_obj->address_space.setup;
				status =
			    region_setup(region_obj, ACPI_REGION_DEACTIVATE,
					 handler_obj->address_space.context,
					 region_context);
				    region_setup(region_obj,
						 ACPI_REGION_DEACTIVATE,
						 handler_obj->address_space.
						 context, region_context);

				/* Init routine may fail, Just ignore errors */

				if (ACPI_FAILURE(status)) {
					ACPI_EXCEPTION((AE_INFO, status,
						"from region init, [%s]",
							"from region handler - deactivate, [%s]",
							acpi_ut_get_region_name
						(region_obj->region.space_id)));
							(region_obj->region.
							 space_id)));
				}

			region_obj->region.flags &= ~(AOPOBJ_SETUP_COMPLETE);
				region_obj->region.flags &=
				    ~(AOPOBJ_SETUP_COMPLETE);
			}

			/*
			 * Remove handler reference in the region
			 *
			 * NOTE: this doesn't mean that the region goes away
			 * The region is just inaccessible as indicated to
			 * the _REG method
			 * NOTE: this doesn't mean that the region goes away, the region
			 * is just inaccessible as indicated to the _REG method
			 *
			 * If the region is on the handler's list
			 * this better be the region's handler
			 * If the region is on the handler's list, this must be the
			 * region's handler
			 */
			region_obj->region.handler = NULL;
			acpi_ut_remove_reference(handler_obj);
+26 −18
Original line number Diff line number Diff line
@@ -428,7 +428,7 @@ acpi_remove_notify_handler(acpi_handle device,
	node = acpi_ns_map_handle_to_node(device);
	if (!node) {
		status = AE_BAD_PARAMETER;
		goto unlock;
		goto unlock_and_exit;
	}

	/* Root Object */
@@ -442,7 +442,7 @@ acpi_remove_notify_handler(acpi_handle device,
		    ((handler_type & ACPI_DEVICE_NOTIFY) &&
		     !acpi_gbl_device_notify.handler)) {
			status = AE_NOT_EXIST;
			goto unlock;
			goto unlock_and_exit;
		}

		/* Make sure all deferred tasks are completed */
@@ -474,7 +474,7 @@ acpi_remove_notify_handler(acpi_handle device,

		if (!acpi_ev_is_notify_object(node)) {
			status = AE_TYPE;
			goto unlock;
			goto unlock_and_exit;
		}

		/* Check for an existing internal object */
@@ -482,17 +482,21 @@ acpi_remove_notify_handler(acpi_handle device,
		obj_desc = acpi_ns_get_attached_object(node);
		if (!obj_desc) {
			status = AE_NOT_EXIST;
			goto unlock;
			goto unlock_and_exit;
		}

		/* Object exists - make sure there's an existing handler */

		if (handler_type & ACPI_SYSTEM_NOTIFY) {
			notify_obj = obj_desc->common_notify.system_notify;
			if ((!notify_obj) ||
			    (notify_obj->notify.handler != handler)) {
			if (!notify_obj) {
				status = AE_NOT_EXIST;
				goto unlock_and_exit;
			}

			if (notify_obj->notify.handler != handler) {
				status = AE_BAD_PARAMETER;
				goto unlock;
				goto unlock_and_exit;
			}
			/* Make sure all deferred tasks are completed */

@@ -510,10 +514,14 @@ acpi_remove_notify_handler(acpi_handle device,

		if (handler_type & ACPI_DEVICE_NOTIFY) {
			notify_obj = obj_desc->common_notify.device_notify;
			if ((!notify_obj) ||
			    (notify_obj->notify.handler != handler)) {
			if (!notify_obj) {
				status = AE_NOT_EXIST;
				goto unlock_and_exit;
			}

			if (notify_obj->notify.handler != handler) {
				status = AE_BAD_PARAMETER;
				goto unlock;
				goto unlock_and_exit;
			}
			/* Make sure all deferred tasks are completed */

@@ -530,7 +538,7 @@ acpi_remove_notify_handler(acpi_handle device,
		}
	}

unlock:
      unlock_and_exit:
	(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
      exit:
	if (ACPI_FAILURE(status))
@@ -586,7 +594,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
	gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number);
	if (!gpe_event_info) {
		status = AE_BAD_PARAMETER;
		goto unlock;
		goto unlock_and_exit;
	}

	/* Make sure that there isn't a handler there already */
@@ -594,7 +602,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
	if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) ==
	    ACPI_GPE_DISPATCH_HANDLER) {
		status = AE_ALREADY_EXISTS;
		goto unlock;
		goto unlock_and_exit;
	}

	/* Allocate and init handler object */
@@ -602,7 +610,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
	handler = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_handler_info));
	if (!handler) {
		status = AE_NO_MEMORY;
		goto unlock;
		goto unlock_and_exit;
	}

	handler->address = address;
@@ -613,7 +621,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,

	status = acpi_ev_disable_gpe(gpe_event_info);
	if (ACPI_FAILURE(status)) {
		goto unlock;
		goto unlock_and_exit;
	}

	/* Install the handler */
@@ -628,7 +636,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,

	acpi_os_release_lock(acpi_gbl_gpe_lock, flags);

unlock:
      unlock_and_exit:
	(void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
      exit:
	if (ACPI_FAILURE(status))
Loading