Skip to content

Commit

Permalink
Merge branch 'acpica'
Browse files Browse the repository at this point in the history
* acpica:
  ACPICA: Update version to 20190816.
  ACPICA: Add "Windows 2019" string to _OSI support.
  ACPICA: Differentiate Windows 8.1 from Windows 8.
  ACPICA: Fully deploy ACPI_PRINTF_LIKE macro
  ACPICA: iASL,acpi_dump: Improve y/n query
  ACPICA: Fix issues with arg types within printf format strings
  ACPICA: Macros: remove pointer math on a null pointer
  ACPICA: Increase total number of possible Owner IDs
  ACPICA: Debugger: remove redundant assignment on obj_desc
  • Loading branch information
Rafael J. Wysocki committed Sep 17, 2019
2 parents 4c4cdc4 + 71bb4d9 commit 522778c
Show file tree
Hide file tree
Showing 24 changed files with 110 additions and 94 deletions.
4 changes: 2 additions & 2 deletions drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ struct acpi_namespace_node {
union acpi_operand_object *object; /* Interpreter object */
u8 descriptor_type; /* Differentiate object descriptor types */
u8 type; /* ACPI Type associated with this name */
u8 flags; /* Miscellaneous flags */
acpi_owner_id owner_id; /* Node creator */
u16 flags; /* Miscellaneous flags */
union acpi_name_union name; /* ACPI Name, always 4 chars per ACPI spec */
struct acpi_namespace_node *parent; /* Parent node */
struct acpi_namespace_node *child; /* First child */
struct acpi_namespace_node *peer; /* First peer */
acpi_owner_id owner_id; /* Node creator */

/*
* The following fields are used by the ASL compiler and disassembler only
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ struct acpi_object_method {
} dispatch;

u32 aml_length;
u8 thread_count;
acpi_owner_id owner_id;
u8 thread_count;
};

/* Flags for info_flags field above */
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acstruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ struct acpi_evaluate_info {
u32 return_flags; /* Used for return value analysis */
u32 return_btype; /* Bitmapped type of the returned object */
u16 param_count; /* Count of the input argument list */
u16 node_flags; /* Same as Node->Flags */
u8 pass_number; /* Parser pass number */
u8 return_object_type; /* Object type of the returned object */
u8 node_flags; /* Same as Node->Flags */
u8 flags; /* General flags */
};

Expand Down
10 changes: 7 additions & 3 deletions drivers/acpi/acpica/acutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -686,22 +686,26 @@ void acpi_ut_delete_address_lists(void);
/*
* utxferror - various error/warning output functions
*/
ACPI_PRINTF_LIKE(5)
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_predefined_warning(const char *module_name,
u32 line_number,
char *pathname,
u8 node_flags, const char *format, ...);
u16 node_flags, const char *format, ...);

ACPI_PRINTF_LIKE(5)
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_predefined_info(const char *module_name,
u32 line_number,
char *pathname, u8 node_flags, const char *format, ...);
char *pathname,
u16 node_flags, const char *format, ...);

ACPI_PRINTF_LIKE(5)
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_predefined_bios_error(const char *module_name,
u32 line_number,
char *pathname,
u8 node_flags, const char *format, ...);
u16 node_flags, const char *format, ...);

void
acpi_ut_prefixed_namespace_error(const char *module_name,
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/dbhistry.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ void acpi_db_display_history(void)

for (i = 0; i < acpi_gbl_num_history; i++) {
if (acpi_gbl_history_buffer[history_index].command) {
acpi_os_printf("%3ld %s\n",
acpi_os_printf("%3u %s\n",
acpi_gbl_history_buffer[history_index].
cmd_num,
acpi_gbl_history_buffer[history_index].
Expand Down
10 changes: 5 additions & 5 deletions drivers/acpi/acpica/dbinput.c
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ static u32 acpi_db_get_line(char *input_buffer)
input_buffer)) {
acpi_os_printf
("Buffer overflow while parsing input line (max %u characters)\n",
sizeof(acpi_gbl_db_parsed_buf));
(u32)sizeof(acpi_gbl_db_parsed_buf));
return (0);
}

Expand Down Expand Up @@ -853,24 +853,24 @@ acpi_db_command_dispatch(char *input_buffer,

if (param_count == 0) {
acpi_os_printf
("Current debug level for file output is: %8.8lX\n",
("Current debug level for file output is: %8.8X\n",
acpi_gbl_db_debug_level);
acpi_os_printf
("Current debug level for console output is: %8.8lX\n",
("Current debug level for console output is: %8.8X\n",
acpi_gbl_db_console_debug_level);
} else if (param_count == 2) {
temp = acpi_gbl_db_console_debug_level;
acpi_gbl_db_console_debug_level =
strtoul(acpi_gbl_db_args[1], NULL, 16);
acpi_os_printf
("Debug Level for console output was %8.8lX, now %8.8lX\n",
("Debug Level for console output was %8.8X, now %8.8X\n",
temp, acpi_gbl_db_console_debug_level);
} else {
temp = acpi_gbl_db_debug_level;
acpi_gbl_db_debug_level =
strtoul(acpi_gbl_db_args[1], NULL, 16);
acpi_os_printf
("Debug Level for file output was %8.8lX, now %8.8lX\n",
("Debug Level for file output was %8.8X, now %8.8X\n",
temp, acpi_gbl_db_debug_level);
}
break;
Expand Down
4 changes: 4 additions & 0 deletions drivers/acpi/acpica/dbmethod.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,10 @@ acpi_status acpi_db_disassemble_method(char *name)
}

status = acpi_ut_allocate_owner_id(&obj_desc->method.owner_id);
if (ACPI_FAILURE(status)) {
return (status);
}

walk_state->owner_id = obj_desc->method.owner_id;

/* Push start scope on scope stack and make it current */
Expand Down
1 change: 0 additions & 1 deletion drivers/acpi/acpica/dbobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ void acpi_db_decode_locals(struct acpi_walk_state *walk_state)
u8 display_locals = FALSE;

node = walk_state->method_node;
obj_desc = walk_state->method_desc;

/* There are no locals for the module-level code case */

Expand Down
92 changes: 45 additions & 47 deletions drivers/acpi/acpica/dbstats.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,17 +341,17 @@ acpi_status acpi_db_display_statistics(char *type_arg)
"ACPI_TYPE", "NODES", "OBJECTS");

for (i = 0; i < ACPI_TYPE_NS_NODE_MAX; i++) {
acpi_os_printf("%16.16s % 10ld% 10ld\n",
acpi_os_printf("%16.16s %10u %10u\n",
acpi_ut_get_type_name(i),
acpi_gbl_node_type_count[i],
acpi_gbl_obj_type_count[i]);
}

acpi_os_printf("%16.16s % 10ld% 10ld\n", "Misc/Unknown",
acpi_os_printf("%16.16s %10u %10u\n", "Misc/Unknown",
acpi_gbl_node_type_count_misc,
acpi_gbl_obj_type_count_misc);

acpi_os_printf("%16.16s % 10ld% 10ld\n", "TOTALS:",
acpi_os_printf("%16.16s %10u %10u\n", "TOTALS:",
acpi_gbl_num_nodes, acpi_gbl_num_objects);
break;

Expand Down Expand Up @@ -379,16 +379,14 @@ acpi_status acpi_db_display_statistics(char *type_arg)
case CMD_STAT_MISC:

acpi_os_printf("\nMiscellaneous Statistics:\n\n");
acpi_os_printf("Calls to AcpiPsFind:.. ........% 7ld\n",
acpi_os_printf("%-28s: %7u\n", "Calls to AcpiPsFind",
acpi_gbl_ps_find_count);
acpi_os_printf("Calls to AcpiNsLookup:..........% 7ld\n",
acpi_os_printf("%-28s: %7u\n", "Calls to AcpiNsLookup",
acpi_gbl_ns_lookup_count);

acpi_os_printf("\n");

acpi_os_printf("Mutex usage:\n\n");
acpi_os_printf("\nMutex usage:\n\n");
for (i = 0; i < ACPI_NUM_MUTEX; i++) {
acpi_os_printf("%-28s: % 7ld\n",
acpi_os_printf("%-28s: %7u\n",
acpi_ut_get_mutex_name(i),
acpi_gbl_mutex_info[i].use_count);
}
Expand All @@ -399,87 +397,87 @@ acpi_status acpi_db_display_statistics(char *type_arg)
acpi_os_printf("\nInternal object sizes:\n\n");

acpi_os_printf("Common %3d\n",
sizeof(struct acpi_object_common));
(u32)sizeof(struct acpi_object_common));
acpi_os_printf("Number %3d\n",
sizeof(struct acpi_object_integer));
(u32)sizeof(struct acpi_object_integer));
acpi_os_printf("String %3d\n",
sizeof(struct acpi_object_string));
(u32)sizeof(struct acpi_object_string));
acpi_os_printf("Buffer %3d\n",
sizeof(struct acpi_object_buffer));
(u32)sizeof(struct acpi_object_buffer));
acpi_os_printf("Package %3d\n",
sizeof(struct acpi_object_package));
(u32)sizeof(struct acpi_object_package));
acpi_os_printf("BufferField %3d\n",
sizeof(struct acpi_object_buffer_field));
(u32)sizeof(struct acpi_object_buffer_field));
acpi_os_printf("Device %3d\n",
sizeof(struct acpi_object_device));
(u32)sizeof(struct acpi_object_device));
acpi_os_printf("Event %3d\n",
sizeof(struct acpi_object_event));
(u32)sizeof(struct acpi_object_event));
acpi_os_printf("Method %3d\n",
sizeof(struct acpi_object_method));
(u32)sizeof(struct acpi_object_method));
acpi_os_printf("Mutex %3d\n",
sizeof(struct acpi_object_mutex));
(u32)sizeof(struct acpi_object_mutex));
acpi_os_printf("Region %3d\n",
sizeof(struct acpi_object_region));
(u32)sizeof(struct acpi_object_region));
acpi_os_printf("PowerResource %3d\n",
sizeof(struct acpi_object_power_resource));
(u32)sizeof(struct acpi_object_power_resource));
acpi_os_printf("Processor %3d\n",
sizeof(struct acpi_object_processor));
(u32)sizeof(struct acpi_object_processor));
acpi_os_printf("ThermalZone %3d\n",
sizeof(struct acpi_object_thermal_zone));
(u32)sizeof(struct acpi_object_thermal_zone));
acpi_os_printf("RegionField %3d\n",
sizeof(struct acpi_object_region_field));
(u32)sizeof(struct acpi_object_region_field));
acpi_os_printf("BankField %3d\n",
sizeof(struct acpi_object_bank_field));
(u32)sizeof(struct acpi_object_bank_field));
acpi_os_printf("IndexField %3d\n",
sizeof(struct acpi_object_index_field));
(u32)sizeof(struct acpi_object_index_field));
acpi_os_printf("Reference %3d\n",
sizeof(struct acpi_object_reference));
(u32)sizeof(struct acpi_object_reference));
acpi_os_printf("Notify %3d\n",
sizeof(struct acpi_object_notify_handler));
(u32)sizeof(struct acpi_object_notify_handler));
acpi_os_printf("AddressSpace %3d\n",
sizeof(struct acpi_object_addr_handler));
(u32)sizeof(struct acpi_object_addr_handler));
acpi_os_printf("Extra %3d\n",
sizeof(struct acpi_object_extra));
(u32)sizeof(struct acpi_object_extra));
acpi_os_printf("Data %3d\n",
sizeof(struct acpi_object_data));
(u32)sizeof(struct acpi_object_data));

acpi_os_printf("\n");

acpi_os_printf("ParseObject %3d\n",
sizeof(struct acpi_parse_obj_common));
(u32)sizeof(struct acpi_parse_obj_common));
acpi_os_printf("ParseObjectNamed %3d\n",
sizeof(struct acpi_parse_obj_named));
(u32)sizeof(struct acpi_parse_obj_named));
acpi_os_printf("ParseObjectAsl %3d\n",
sizeof(struct acpi_parse_obj_asl));
(u32)sizeof(struct acpi_parse_obj_asl));
acpi_os_printf("OperandObject %3d\n",
sizeof(union acpi_operand_object));
(u32)sizeof(union acpi_operand_object));
acpi_os_printf("NamespaceNode %3d\n",
sizeof(struct acpi_namespace_node));
(u32)sizeof(struct acpi_namespace_node));
acpi_os_printf("AcpiObject %3d\n",
sizeof(union acpi_object));
(u32)sizeof(union acpi_object));

acpi_os_printf("\n");

acpi_os_printf("Generic State %3d\n",
sizeof(union acpi_generic_state));
(u32)sizeof(union acpi_generic_state));
acpi_os_printf("Common State %3d\n",
sizeof(struct acpi_common_state));
(u32)sizeof(struct acpi_common_state));
acpi_os_printf("Control State %3d\n",
sizeof(struct acpi_control_state));
(u32)sizeof(struct acpi_control_state));
acpi_os_printf("Update State %3d\n",
sizeof(struct acpi_update_state));
(u32)sizeof(struct acpi_update_state));
acpi_os_printf("Scope State %3d\n",
sizeof(struct acpi_scope_state));
(u32)sizeof(struct acpi_scope_state));
acpi_os_printf("Parse Scope %3d\n",
sizeof(struct acpi_pscope_state));
(u32)sizeof(struct acpi_pscope_state));
acpi_os_printf("Package State %3d\n",
sizeof(struct acpi_pkg_state));
(u32)sizeof(struct acpi_pkg_state));
acpi_os_printf("Thread State %3d\n",
sizeof(struct acpi_thread_state));
(u32)sizeof(struct acpi_thread_state));
acpi_os_printf("Result Values %3d\n",
sizeof(struct acpi_result_values));
(u32)sizeof(struct acpi_result_values));
acpi_os_printf("Notify Info %3d\n",
sizeof(struct acpi_notify_info));
(u32)sizeof(struct acpi_notify_info));
break;

case CMD_STAT_STACK:
Expand Down
6 changes: 3 additions & 3 deletions drivers/acpi/acpica/exdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static struct acpi_exdump_info acpi_ex_dump_method[9] = {
"Parameter Count"},
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.sync_level), "Sync Level"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.mutex), "Mutex"},
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.owner_id), "Owner Id"},
{ACPI_EXD_UINT16, ACPI_EXD_OFFSET(method.owner_id), "Owner Id"},
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.thread_count), "Thread Count"},
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(method.aml_length), "Aml Length"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.aml_start), "Aml Start"}
Expand Down Expand Up @@ -269,8 +269,8 @@ static struct acpi_exdump_info acpi_ex_dump_field_common[7] = {

static struct acpi_exdump_info acpi_ex_dump_node[7] = {
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_node), NULL},
{ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(flags), "Flags"},
{ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(owner_id), "Owner Id"},
{ACPI_EXD_UINT16, ACPI_EXD_NSOFFSET(flags), "Flags"},
{ACPI_EXD_UINT16, ACPI_EXD_NSOFFSET(owner_id), "Owner Id"},
{ACPI_EXD_LIST, ACPI_EXD_NSOFFSET(object), "Object List"},
{ACPI_EXD_NODE, ACPI_EXD_NSOFFSET(parent), "Parent"},
{ACPI_EXD_NODE, ACPI_EXD_NSOFFSET(child), "Child"},
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/nsaccess.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
if (flags & ACPI_NS_PREFIX_MUST_EXIST) {
acpi_os_printf(ACPI_MSG_BIOS_ERROR
"Object does not exist: %4.4s\n",
&simple_name);
(char *)&simple_name);
}
#endif
/* Name not found in ACPI namespace */
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/nsalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ void acpi_ns_install_node(struct acpi_walk_state *walk_state, struct acpi_namesp
node->type = (u8) type;

ACPI_DEBUG_PRINT((ACPI_DB_NAMES,
"%4.4s (%s) [Node %p Owner %X] added to %4.4s (%s) [Node %p]\n",
"%4.4s (%s) [Node %p Owner %3.3X] added to %4.4s (%s) [Node %p]\n",
acpi_ut_get_node_name(node),
acpi_ut_get_type_name(node->type), node, owner_id,
acpi_ut_get_node_name(parent_node),
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/nsdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,

/* Now we can print out the pertinent information */

acpi_os_printf(" %-12s %p %2.2X ",
acpi_os_printf(" %-12s %p %3.3X ",
acpi_ut_get_type_name(type), this_node,
this_node->owner_id);

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/nsrepair2.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static const struct acpi_repair_info acpi_ns_repairable_names[] = {

#define ACPI_FDE_FIELD_COUNT 5
#define ACPI_FDE_BYTE_BUFFER_SIZE 5
#define ACPI_FDE_DWORD_BUFFER_SIZE (ACPI_FDE_FIELD_COUNT * sizeof (u32))
#define ACPI_FDE_DWORD_BUFFER_SIZE (ACPI_FDE_FIELD_COUNT * (u32) sizeof (u32))

/******************************************************************************
*
Expand Down
1 change: 1 addition & 0 deletions drivers/acpi/acpica/tbdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,7 @@ acpi_status acpi_tb_delete_namespace_by_owner(u32 table_index)
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}

acpi_ns_delete_namespace_by_owner(owner_id);
acpi_ut_release_write_lock(&acpi_gbl_namespace_rw_lock);
return_ACPI_STATUS(status);
Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/acpica/utdebug.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ acpi_debug_print(u32 requested_debug_level,
* Display the module name, current line number, thread ID (if requested),
* current procedure nesting level, and the current procedure name
*/
acpi_os_printf("%9s-%04ld ", module_name, line_number);
acpi_os_printf("%9s-%04d ", module_name, line_number);

#ifdef ACPI_APPLICATION
/*
Expand All @@ -177,7 +177,7 @@ acpi_debug_print(u32 requested_debug_level,
fill_count = 0;
}

acpi_os_printf("[%02ld] %*s",
acpi_os_printf("[%02d] %*s",
acpi_gbl_nesting_level, acpi_gbl_nesting_level + 1, " ");
acpi_os_printf("%s%*s: ",
acpi_ut_trim_function_name(function_name), fill_count,
Expand Down
Loading

0 comments on commit 522778c

Please sign in to comment.