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

Commit ba609f7f authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branch 'acpica'

* acpica:
  ACPICA: Mark acpi_ut_create_internal_object_dbg() memory allocations as non-leaks
  ACPICA: Update version to 20180508
  ACPICA: acpidump/acpixtract: Support for tables larger than 1MB
  ACPICA: Update version to 20180427
  ACPICA: Debugger: Removed direct support for EC address space in "Test Objects"
  ACPICA: Debugger: Add Package support for "test objects" command
  ACPICA: Improve error messages for the namespace root node
  ACPICA: Fix potential infinite loop in acpi_rs_dump_byte_list
  ACPICA: vsnprintf: this statement may fall through
  ACPICA: Tables: Fix spelling mistake in comment
  ACPICA: iASL: Enhance the -tc option (create AML hex file in C)
  ACPICA: Convert acpi_gbl_hardware lock back to an acpi_raw_spinlock
  ACPICA: provide abstraction for raw_spinlock_t
parents 5a802a7a 087ec156
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -143,6 +143,8 @@ acpi_status
fl_split_input_pathname(char *input_path,
			char **out_directory_path, char **out_filename);

char *fl_get_file_basename(char *file_pathname);

char *ad_generate_filename(char *prefix, char *table_id);

void
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ ACPI_GLOBAL(u8, acpi_gbl_global_lock_pending);
 * interrupt level
 */
ACPI_GLOBAL(acpi_spinlock, acpi_gbl_gpe_lock);	/* For GPE data structs and registers */
ACPI_GLOBAL(acpi_spinlock, acpi_gbl_hardware_lock);	/* For ACPI H/W except GPE registers */
ACPI_GLOBAL(acpi_raw_spinlock, acpi_gbl_hardware_lock);	/* For ACPI H/W except GPE registers */
ACPI_GLOBAL(acpi_spinlock, acpi_gbl_reference_count_lock);

/* Mutex for _OSI support */
+9 −3
Original line number Diff line number Diff line
@@ -189,9 +189,15 @@ void acpi_db_dump_namespace(char *start_arg, char *depth_arg)
	}

	acpi_db_set_output_destination(ACPI_DB_DUPLICATE_OUTPUT);

	if (((struct acpi_namespace_node *)subtree_entry)->parent) {
		acpi_os_printf("ACPI Namespace (from %4.4s (%p) subtree):\n",
		       ((struct acpi_namespace_node *)subtree_entry)->name.
		       ascii, subtree_entry);
			       ((struct acpi_namespace_node *)subtree_entry)->
			       name.ascii, subtree_entry);
	} else {
		acpi_os_printf("ACPI Namespace (from %s):\n",
			       ACPI_NAMESPACE_ROOT);
	}

	/* Display the subtree */

+55 −4
Original line number Diff line number Diff line
@@ -30,6 +30,8 @@ acpi_db_test_buffer_type(struct acpi_namespace_node *node, u32 bit_length);
static acpi_status
acpi_db_test_string_type(struct acpi_namespace_node *node, u32 byte_length);

static acpi_status acpi_db_test_package_type(struct acpi_namespace_node *node);

static acpi_status
acpi_db_read_from_object(struct acpi_namespace_node *node,
			 acpi_object_type expected_type,
@@ -273,6 +275,11 @@ acpi_db_test_one_object(acpi_handle obj_handle,
		bit_length = byte_length * 8;
		break;

	case ACPI_TYPE_PACKAGE:

		local_type = ACPI_TYPE_PACKAGE;
		break;

	case ACPI_TYPE_FIELD_UNIT:
	case ACPI_TYPE_BUFFER_FIELD:
	case ACPI_TYPE_LOCAL_REGION_FIELD:
@@ -305,6 +312,7 @@ acpi_db_test_one_object(acpi_handle obj_handle,

	acpi_os_printf("%14s: %4.4s",
		       acpi_ut_get_type_name(node->type), node->name.ascii);

	if (!obj_desc) {
		acpi_os_printf(" Ignoring, no attached object\n");
		return (AE_OK);
@@ -322,14 +330,13 @@ acpi_db_test_one_object(acpi_handle obj_handle,
		case ACPI_ADR_SPACE_SYSTEM_MEMORY:
		case ACPI_ADR_SPACE_SYSTEM_IO:
		case ACPI_ADR_SPACE_PCI_CONFIG:
		case ACPI_ADR_SPACE_EC:

			break;

		default:

			acpi_os_printf
			    ("    %s space is not supported [%4.4s]\n",
			    ("    %s space is not supported in this command [%4.4s]\n",
			     acpi_ut_get_region_name(region_obj->region.
						     space_id),
			     region_obj->region.node->name.ascii);
@@ -359,6 +366,11 @@ acpi_db_test_one_object(acpi_handle obj_handle,
		status = acpi_db_test_buffer_type(node, bit_length);
		break;

	case ACPI_TYPE_PACKAGE:

		status = acpi_db_test_package_type(node);
		break;

	default:

		acpi_os_printf(" Ignoring, type not implemented (%2.2X)",
@@ -366,6 +378,13 @@ acpi_db_test_one_object(acpi_handle obj_handle,
		break;
	}

	/* Exit on error, but don't abort the namespace walk */

	if (ACPI_FAILURE(status)) {
		status = AE_OK;
		goto exit;
	}

	switch (node->type) {
	case ACPI_TYPE_LOCAL_REGION_FIELD:

@@ -373,12 +392,14 @@ acpi_db_test_one_object(acpi_handle obj_handle,
		acpi_os_printf(" (%s)",
			       acpi_ut_get_region_name(region_obj->region.
						       space_id));

		break;

	default:
		break;
	}

exit:
	acpi_os_printf("\n");
	return (status);
}
@@ -431,7 +452,6 @@ acpi_db_test_integer_type(struct acpi_namespace_node *node, u32 bit_length)
	if (temp1->integer.value == value_to_write) {
		value_to_write = 0;
	}

	/* Write a new value */

	write_value.type = ACPI_TYPE_INTEGER;
@@ -706,6 +726,35 @@ acpi_db_test_string_type(struct acpi_namespace_node *node, u32 byte_length)
	return (status);
}

/*******************************************************************************
 *
 * FUNCTION:    acpi_db_test_package_type
 *
 * PARAMETERS:  node                - Parent NS node for the object
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Test read for a Package object.
 *
 ******************************************************************************/

static acpi_status acpi_db_test_package_type(struct acpi_namespace_node *node)
{
	union acpi_object *temp1 = NULL;
	acpi_status status;

	/* Read the original value */

	status = acpi_db_read_from_object(node, ACPI_TYPE_PACKAGE, &temp1);
	if (ACPI_FAILURE(status)) {
		return (status);
	}

	acpi_os_printf(" %8.8X Elements", temp1->package.count);
	acpi_os_free(temp1);
	return (status);
}

/*******************************************************************************
 *
 * FUNCTION:    acpi_db_read_from_object
@@ -746,8 +795,8 @@ acpi_db_read_from_object(struct acpi_namespace_node *node,
	acpi_gbl_method_executing = TRUE;
	status = acpi_evaluate_object(read_handle, NULL,
				      &param_objects, &return_obj);
	acpi_gbl_method_executing = FALSE;

	acpi_gbl_method_executing = FALSE;
	if (ACPI_FAILURE(status)) {
		acpi_os_printf("Could not read from object, %s",
			       acpi_format_exception(status));
@@ -760,6 +809,7 @@ acpi_db_read_from_object(struct acpi_namespace_node *node,
	case ACPI_TYPE_INTEGER:
	case ACPI_TYPE_BUFFER:
	case ACPI_TYPE_STRING:
	case ACPI_TYPE_PACKAGE:
		/*
		 * Did we receive the type we wanted? Most important for the
		 * Integer/Buffer case (when a field is larger than an Integer,
@@ -771,6 +821,7 @@ acpi_db_read_from_object(struct acpi_namespace_node *node,
			     acpi_ut_get_type_name(expected_type),
			     acpi_ut_get_type_name(ret_value->type));

			acpi_os_free(return_obj.pointer);
			return (AE_TYPE);
		}

+4 −4
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ acpi_ds_scope_stack_push(struct acpi_namespace_node *node,
				      acpi_ut_get_type_name(old_scope_info->
							    common.value)));
	} else {
		ACPI_DEBUG_PRINT_RAW((ACPI_DB_EXEC, "[\\___] (%s)", "ROOT"));
		ACPI_DEBUG_PRINT_RAW((ACPI_DB_EXEC, ACPI_NAMESPACE_ROOT));
	}

	ACPI_DEBUG_PRINT_RAW((ACPI_DB_EXEC,
@@ -166,14 +166,14 @@ acpi_status acpi_ds_scope_stack_pop(struct acpi_walk_state *walk_state)

	new_scope_info = walk_state->scope_info;
	if (new_scope_info) {
		ACPI_DEBUG_PRINT_RAW((ACPI_DB_EXEC,
				      "[%4.4s] (%s)\n",
		ACPI_DEBUG_PRINT_RAW((ACPI_DB_EXEC, "[%4.4s] (%s)\n",
				      acpi_ut_get_node_name(new_scope_info->
							    scope.node),
				      acpi_ut_get_type_name(new_scope_info->
							    common.value)));
	} else {
		ACPI_DEBUG_PRINT_RAW((ACPI_DB_EXEC, "[\\___] (ROOT)\n"));
		ACPI_DEBUG_PRINT_RAW((ACPI_DB_EXEC, "%s\n",
				      ACPI_NAMESPACE_ROOT));
	}

	acpi_ut_delete_generic_state(scope_info);
Loading