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

Commit 173cc11a authored by Len Brown's avatar Len Brown
Browse files

Merge branch 'acpica' into release

parents 8bea8672 88e50715
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -296,6 +296,11 @@ acpi_ns_complex_repairs(struct acpi_predefined_data *data,
			acpi_status validate_status,
			union acpi_operand_object **return_object_ptr);

void
acpi_ns_remove_null_elements(struct acpi_predefined_data *data,
			     u8 package_type,
			     union acpi_operand_object *obj_desc);

/*
 * nssearch - Namespace searching and entry
 */
@@ -354,9 +359,7 @@ acpi_ns_externalize_name(u32 internal_name_length,
			 const char *internal_name,
			 u32 * converted_name_length, char **converted_name);

struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle);

acpi_handle acpi_ns_convert_entry_to_handle(struct acpi_namespace_node *node);
struct acpi_namespace_node *acpi_ns_validate_handle(acpi_handle handle);

void acpi_ns_terminate(void);

+5 −1
Original line number Diff line number Diff line
@@ -180,7 +180,11 @@ struct acpi_object_method {
	u8 sync_level;
	union acpi_operand_object *mutex;
	u8 *aml_start;
	union {
		ACPI_INTERNAL_METHOD implementation;
		union acpi_operand_object *handler;
	} extra;

	u32 aml_length;
	u8 thread_count;
	acpi_owner_id owner_id;
+1 −1
Original line number Diff line number Diff line
@@ -414,7 +414,7 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
	/* Invoke an internal method if necessary */

	if (obj_desc->method.method_flags & AML_METHOD_INTERNAL_ONLY) {
		status = obj_desc->method.implementation(next_walk_state);
		status = obj_desc->method.extra.implementation(next_walk_state);
		if (status == AE_OK) {
			status = AE_CTRL_TERMINATE;
		}
+39 −25
Original line number Diff line number Diff line
@@ -212,18 +212,19 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
		case ACPI_TYPE_BUFFER:

			/*
			 * These types we will allow, but we will change the type. This
			 * enables some existing code of the form:
			 * These types we will allow, but we will change the type.
			 * This enables some existing code of the form:
			 *
			 *  Name (DEB, 0)
			 *  Scope (DEB) { ... }
			 *
			 * Note: silently change the type here. On the second pass, we will report
			 * a warning
			 * Note: silently change the type here. On the second pass,
			 * we will report a warning
			 */
			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
					  "Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)\n",
					  path,
					  "Type override - [%4.4s] had invalid type (%s) "
					  "for Scope operator, changed to type ANY\n",
					  acpi_ut_get_node_name(node),
					  acpi_ut_get_type_name(node->type)));

			node->type = ACPI_TYPE_ANY;
@@ -235,8 +236,10 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
			/* All other types are an error */

			ACPI_ERROR((AE_INFO,
				    "Invalid type (%s) for target of Scope operator [%4.4s] (Cannot override)",
				    acpi_ut_get_type_name(node->type), path));
				    "Invalid type (%s) for target of "
				    "Scope operator [%4.4s] (Cannot override)",
				    acpi_ut_get_type_name(node->type),
				    acpi_ut_get_node_name(node)));

			return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
		}
@@ -697,15 +700,16 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
		case ACPI_TYPE_BUFFER:

			/*
			 * These types we will allow, but we will change the type. This
			 * enables some existing code of the form:
			 * These types we will allow, but we will change the type.
			 * This enables some existing code of the form:
			 *
			 *  Name (DEB, 0)
			 *  Scope (DEB) { ... }
			 */
			ACPI_WARNING((AE_INFO,
				      "Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)",
				      buffer_ptr,
				      "Type override - [%4.4s] had invalid type (%s) "
				      "for Scope operator, changed to type ANY\n",
				      acpi_ut_get_node_name(node),
				      acpi_ut_get_type_name(node->type)));

			node->type = ACPI_TYPE_ANY;
@@ -717,9 +721,10 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
			/* All other types are an error */

			ACPI_ERROR((AE_INFO,
				    "Invalid type (%s) for target of Scope operator [%4.4s]",
				    "Invalid type (%s) for target of "
				    "Scope operator [%4.4s] (Cannot override)",
				    acpi_ut_get_type_name(node->type),
				    buffer_ptr));
				    acpi_ut_get_node_name(node)));

			return (AE_AML_OPERAND_TYPE);
		}
@@ -1047,9 +1052,22 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
			}

			/*
			 * If we are executing a method, initialize the region
			 * The op_region is not fully parsed at this time. The only valid
			 * argument is the space_id. (We must save the address of the
			 * AML of the address and length operands)
			 *
			 * If we have a valid region, initialize it. The namespace is
			 * unlocked at this point.
			 *
			 * Need to unlock interpreter if it is locked (if we are running
			 * a control method), in order to allow _REG methods to be run
			 * during acpi_ev_initialize_region.
			 */
			if (walk_state->method_node) {
				/*
				 * Executing a method: initialize the region and unlock
				 * the interpreter
				 */
				status =
				    acpi_ex_create_region(op->named.data,
							  op->named.length,
@@ -1058,21 +1076,17 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
				if (ACPI_FAILURE(status)) {
					return (status);
				}
			}

			/*
			 * The op_region is not fully parsed at this time. Only valid
			 * argument is the space_id. (We must save the address of the
			 * AML of the address and length operands)
			 */
				acpi_ex_exit_interpreter();
			}

			/*
			 * If we have a valid region, initialize it
			 * Namespace is NOT locked at this point.
			 */
			status =
			    acpi_ev_initialize_region
			    (acpi_ns_get_attached_object(node), FALSE);
			if (walk_state->method_node) {
				acpi_ex_enter_interpreter();
			}

			if (ACPI_FAILURE(status)) {
				/*
				 *  If AE_NOT_EXIST is returned, it is not fatal
+2 −2
Original line number Diff line number Diff line
@@ -718,7 +718,7 @@ acpi_ev_install_handler(acpi_handle obj_handle,

	/* Convert and validate the device handle */

	node = acpi_ns_map_handle_to_node(obj_handle);
	node = acpi_ns_validate_handle(obj_handle);
	if (!node) {
		return (AE_BAD_PARAMETER);
	}
@@ -1087,7 +1087,7 @@ acpi_ev_reg_run(acpi_handle obj_handle,

	/* Convert and validate the device handle */

	node = acpi_ns_map_handle_to_node(obj_handle);
	node = acpi_ns_validate_handle(obj_handle);
	if (!node) {
		return (AE_BAD_PARAMETER);
	}
Loading