Skip to content

Commit 2a2bafc

Browse files
committed
Merge branch 'acpica'
* acpica: (40 commits) ACPICA: Update version to 20171215 ACPICA: trivial style fix, no functional change ACPICA: Fix a couple memory leaks during package object resolution ACPICA: Recognize the Windows 10 version 1607 and 1703 OSI strings ACPICA: DT compiler: prevent error if optional field at the end of table is not present ACPICA: Rename a global variable, no functional change ACPICA: Create and deploy safe version of strncpy ACPICA: Cleanup the global variables and update comments ACPICA: Debugger: fix slight indentation issue ACPICA: Fix a regression in the acpi_evaluate_object_type() interface ACPICA: Update for a few debug output statements ACPICA: Debug output, no functional change ACPICA: Update information in MAINTAINERS ACPICA: Rename variable to match upstream ACPICA: Update version to 20171110 ACPICA: ACPI 6.2: Additional PPTT flags ACPICA: Update linkage for get mutex name interface ACPICA: Update mutex error messages, no functional change ACPICA: Debugger: add "background" command for method execution ACPICA: Small typo fix, no functional change ...
2 parents 90fd94e + 3bd93bd commit 2a2bafc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+877
-287
lines changed

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ F: drivers/acpi/apei/
321321

322322
ACPI COMPONENT ARCHITECTURE (ACPICA)
323323
M: Robert Moore <[email protected]>
324-
M: Lv Zheng <lv.zheng@intel.com>
324+
M: Erik Schmauss <erik.schmauss@intel.com>
325325
M: "Rafael J. Wysocki" <[email protected]>
326326
327327

drivers/acpi/acpica/acapps.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@
8080
prefix, ACPICA_COPYRIGHT, \
8181
prefix
8282

83+
#define ACPI_COMMON_BUILD_TIME \
84+
"Build date/time: %s %s\n", __DATE__, __TIME__
85+
8386
/* Macros for usage messages */
8487

8588
#define ACPI_USAGE_HEADER(usage) \

drivers/acpi/acpica/acdebug.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ ACPI_DBR_DEPENDENT_RETURN_VOID(void
222222
void
223223
acpi_db_execute(char *name, char **args, acpi_object_type *types, u32 flags);
224224

225+
void
226+
acpi_db_create_execution_thread(char *method_name_arg,
227+
char **arguments, acpi_object_type *types);
228+
225229
void
226230
acpi_db_create_execution_threads(char *num_threads_arg,
227231
char *num_loops_arg, char *method_name_arg);

drivers/acpi/acpica/acglobal.h

Lines changed: 27 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
/*****************************************************************************
4848
*
49-
* Globals related to the ACPI tables
49+
* Globals related to the incoming ACPI tables
5050
*
5151
****************************************************************************/
5252

@@ -87,7 +87,7 @@ ACPI_GLOBAL(u8, acpi_gbl_integer_nybble_width);
8787

8888
/*****************************************************************************
8989
*
90-
* Mutual exclusion within ACPICA subsystem
90+
* Mutual exclusion within the ACPICA subsystem
9191
*
9292
****************************************************************************/
9393

@@ -167,7 +167,7 @@ ACPI_GLOBAL(u8, acpi_gbl_next_owner_id_offset);
167167

168168
ACPI_INIT_GLOBAL(u8, acpi_gbl_namespace_initialized, FALSE);
169169

170-
/* Misc */
170+
/* Miscellaneous */
171171

172172
ACPI_GLOBAL(u32, acpi_gbl_original_mode);
173173
ACPI_GLOBAL(u32, acpi_gbl_ns_lookup_count);
@@ -191,10 +191,9 @@ extern const char acpi_gbl_lower_hex_digits[];
191191
extern const char acpi_gbl_upper_hex_digits[];
192192
extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES];
193193

194-
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
195-
196194
/* Lists for tracking memory allocations (debug only) */
197195

196+
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
198197
ACPI_GLOBAL(struct acpi_memory_list *, acpi_gbl_global_list);
199198
ACPI_GLOBAL(struct acpi_memory_list *, acpi_gbl_ns_node_list);
200199
ACPI_GLOBAL(u8, acpi_gbl_display_final_mem_stats);
@@ -203,7 +202,7 @@ ACPI_GLOBAL(u8, acpi_gbl_disable_mem_tracking);
203202

204203
/*****************************************************************************
205204
*
206-
* Namespace globals
205+
* ACPI Namespace
207206
*
208207
****************************************************************************/
209208

@@ -234,15 +233,20 @@ ACPI_INIT_GLOBAL(u32, acpi_gbl_nesting_level, 0);
234233

235234
/*****************************************************************************
236235
*
237-
* Interpreter globals
236+
* Interpreter/Parser globals
238237
*
239238
****************************************************************************/
240239

241-
ACPI_GLOBAL(struct acpi_thread_state *, acpi_gbl_current_walk_list);
242-
243240
/* Control method single step flag */
244241

245242
ACPI_GLOBAL(u8, acpi_gbl_cm_single_step);
243+
ACPI_GLOBAL(struct acpi_thread_state *, acpi_gbl_current_walk_list);
244+
ACPI_INIT_GLOBAL(union acpi_parse_object, *acpi_gbl_current_scope, NULL);
245+
246+
/* ASL/ASL+ converter */
247+
248+
ACPI_INIT_GLOBAL(u8, acpi_gbl_capture_comments, FALSE);
249+
ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_last_list_head, NULL);
246250

247251
/*****************************************************************************
248252
*
@@ -252,7 +256,6 @@ ACPI_GLOBAL(u8, acpi_gbl_cm_single_step);
252256

253257
extern struct acpi_bit_register_info
254258
acpi_gbl_bit_register_info[ACPI_NUM_BITREG];
255-
256259
ACPI_GLOBAL(u8, acpi_gbl_sleep_type_a);
257260
ACPI_GLOBAL(u8, acpi_gbl_sleep_type_b);
258261

@@ -263,7 +266,6 @@ ACPI_GLOBAL(u8, acpi_gbl_sleep_type_b);
263266
****************************************************************************/
264267

265268
#if (!ACPI_REDUCED_HARDWARE)
266-
267269
ACPI_GLOBAL(u8, acpi_gbl_all_gpes_initialized);
268270
ACPI_GLOBAL(struct acpi_gpe_xrupt_info *, acpi_gbl_gpe_xrupt_list_head);
269271
ACPI_GLOBAL(struct acpi_gpe_block_info *,
@@ -272,10 +274,8 @@ ACPI_GLOBAL(acpi_gbl_event_handler, acpi_gbl_global_event_handler);
272274
ACPI_GLOBAL(void *, acpi_gbl_global_event_handler_context);
273275
ACPI_GLOBAL(struct acpi_fixed_event_handler,
274276
acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS]);
275-
276277
extern struct acpi_fixed_event_info
277278
acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS];
278-
279279
#endif /* !ACPI_REDUCED_HARDWARE */
280280

281281
/*****************************************************************************
@@ -291,14 +291,14 @@ ACPI_GLOBAL(u32, acpi_gpe_count);
291291
ACPI_GLOBAL(u32, acpi_sci_count);
292292
ACPI_GLOBAL(u32, acpi_fixed_event_count[ACPI_NUM_FIXED_EVENTS]);
293293

294-
/* Support for dynamic control method tracing mechanism */
294+
/* Dynamic control method tracing mechanism */
295295

296296
ACPI_GLOBAL(u32, acpi_gbl_original_dbg_level);
297297
ACPI_GLOBAL(u32, acpi_gbl_original_dbg_layer);
298298

299299
/*****************************************************************************
300300
*
301-
* Debugger and Disassembler globals
301+
* Debugger and Disassembler
302302
*
303303
****************************************************************************/
304304

@@ -326,7 +326,6 @@ ACPI_GLOBAL(struct acpi_external_file *, acpi_gbl_external_file_list);
326326
#endif
327327

328328
#ifdef ACPI_DEBUGGER
329-
330329
ACPI_INIT_GLOBAL(u8, acpi_gbl_abort_method, FALSE);
331330
ACPI_INIT_GLOBAL(acpi_thread_id, acpi_gbl_db_thread_id, ACPI_INVALID_THREAD_ID);
332331

@@ -340,7 +339,6 @@ ACPI_GLOBAL(u32, acpi_gbl_db_console_debug_level);
340339
ACPI_GLOBAL(struct acpi_namespace_node *, acpi_gbl_db_scope_node);
341340
ACPI_GLOBAL(u8, acpi_gbl_db_terminate_loop);
342341
ACPI_GLOBAL(u8, acpi_gbl_db_threads_terminated);
343-
344342
ACPI_GLOBAL(char *, acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS]);
345343
ACPI_GLOBAL(acpi_object_type, acpi_gbl_db_arg_types[ACPI_DEBUGGER_MAX_ARGS]);
346344

@@ -350,32 +348,33 @@ ACPI_GLOBAL(char, acpi_gbl_db_parsed_buf[ACPI_DB_LINE_BUFFER_SIZE]);
350348
ACPI_GLOBAL(char, acpi_gbl_db_scope_buf[ACPI_DB_LINE_BUFFER_SIZE]);
351349
ACPI_GLOBAL(char, acpi_gbl_db_debug_filename[ACPI_DB_LINE_BUFFER_SIZE]);
352350

353-
/*
354-
* Statistic globals
355-
*/
351+
/* Statistics globals */
352+
356353
ACPI_GLOBAL(u16, acpi_gbl_obj_type_count[ACPI_TOTAL_TYPES]);
357354
ACPI_GLOBAL(u16, acpi_gbl_node_type_count[ACPI_TOTAL_TYPES]);
358355
ACPI_GLOBAL(u16, acpi_gbl_obj_type_count_misc);
359356
ACPI_GLOBAL(u16, acpi_gbl_node_type_count_misc);
360357
ACPI_GLOBAL(u32, acpi_gbl_num_nodes);
361358
ACPI_GLOBAL(u32, acpi_gbl_num_objects);
362-
363359
#endif /* ACPI_DEBUGGER */
364360

365361
#if defined (ACPI_DISASSEMBLER) || defined (ACPI_ASL_COMPILER)
366-
367362
ACPI_GLOBAL(const char, *acpi_gbl_pld_panel_list[]);
368363
ACPI_GLOBAL(const char, *acpi_gbl_pld_vertical_position_list[]);
369364
ACPI_GLOBAL(const char, *acpi_gbl_pld_horizontal_position_list[]);
370365
ACPI_GLOBAL(const char, *acpi_gbl_pld_shape_list[]);
371-
372366
ACPI_INIT_GLOBAL(u8, acpi_gbl_disasm_flag, FALSE);
373-
374367
#endif
375368

376-
/*
377-
* Meant for the -ca option.
378-
*/
369+
/*****************************************************************************
370+
*
371+
* ACPICA application-specific globals
372+
*
373+
****************************************************************************/
374+
375+
/* ASL-to-ASL+ conversion utility (implemented within the iASL compiler) */
376+
377+
#ifdef ACPI_ASL_COMPILER
379378
ACPI_INIT_GLOBAL(char *, acpi_gbl_current_inline_comment, NULL);
380379
ACPI_INIT_GLOBAL(char *, acpi_gbl_current_end_node_comment, NULL);
381380
ACPI_INIT_GLOBAL(char *, acpi_gbl_current_open_brace_comment, NULL);
@@ -386,54 +385,37 @@ ACPI_INIT_GLOBAL(char *, acpi_gbl_current_filename, NULL);
386385
ACPI_INIT_GLOBAL(char *, acpi_gbl_current_parent_filename, NULL);
387386
ACPI_INIT_GLOBAL(char *, acpi_gbl_current_include_filename, NULL);
388387

389-
ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_last_list_head, NULL);
390-
391388
ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_def_blk_comment_list_head,
392389
NULL);
393390
ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_def_blk_comment_list_tail,
394391
NULL);
395-
396392
ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_reg_comment_list_head,
397393
NULL);
398394
ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_reg_comment_list_tail,
399395
NULL);
400-
401396
ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_inc_comment_list_head,
402397
NULL);
403398
ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_inc_comment_list_tail,
404399
NULL);
405-
406400
ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_end_blk_comment_list_head,
407401
NULL);
408402
ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_end_blk_comment_list_tail,
409403
NULL);
410404

411405
ACPI_INIT_GLOBAL(struct acpi_comment_addr_node,
412406
*acpi_gbl_comment_addr_list_head, NULL);
413-
414-
ACPI_INIT_GLOBAL(union acpi_parse_object, *acpi_gbl_current_scope, NULL);
415-
416407
ACPI_INIT_GLOBAL(struct acpi_file_node, *acpi_gbl_file_tree_root, NULL);
417408

418409
ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_reg_comment_cache);
419410
ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_comment_addr_cache);
420411
ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_file_cache);
421412

422-
ACPI_INIT_GLOBAL(u8, gbl_capture_comments, FALSE);
423-
424413
ACPI_INIT_GLOBAL(u8, acpi_gbl_debug_asl_conversion, FALSE);
425414
ACPI_INIT_GLOBAL(ACPI_FILE, acpi_gbl_conv_debug_file, NULL);
426-
427415
ACPI_GLOBAL(char, acpi_gbl_table_sig[4]);
428-
429-
/*****************************************************************************
430-
*
431-
* Application globals
432-
*
433-
****************************************************************************/
416+
#endif
434417

435418
#ifdef ACPI_APPLICATION
436-
437419
ACPI_INIT_GLOBAL(ACPI_FILE, acpi_gbl_debug_file, NULL);
438420
ACPI_INIT_GLOBAL(ACPI_FILE, acpi_gbl_output_file, NULL);
439421
ACPI_INIT_GLOBAL(u8, acpi_gbl_debug_timeout, FALSE);
@@ -442,16 +424,6 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_debug_timeout, FALSE);
442424

443425
ACPI_GLOBAL(acpi_spinlock, acpi_gbl_print_lock); /* For print buffer */
444426
ACPI_GLOBAL(char, acpi_gbl_print_buffer[1024]);
445-
446427
#endif /* ACPI_APPLICATION */
447428

448-
/*****************************************************************************
449-
*
450-
* Info/help support
451-
*
452-
****************************************************************************/
453-
454-
extern const struct ah_predefined_name asl_predefined_info[];
455-
extern const struct ah_device_id asl_device_ids[];
456-
457429
#endif /* __ACGLOBAL_H__ */

drivers/acpi/acpica/aclocal.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ struct acpi_control_state {
622622
union acpi_parse_object *predicate_op;
623623
u8 *aml_predicate_start; /* Start of if/while predicate */
624624
u8 *package_end; /* End of if/while block */
625-
u32 loop_count; /* While() loop counter */
625+
u64 loop_timeout; /* While() loop timeout */
626626
};
627627

628628
/*
@@ -1218,16 +1218,17 @@ struct acpi_db_method_info {
12181218
acpi_object_type *types;
12191219

12201220
/*
1221-
* Arguments to be passed to method for the command
1222-
* Threads -
1223-
* the Number of threads, ID of current thread and
1224-
* Index of current thread inside all them created.
1221+
* Arguments to be passed to method for the commands Threads and
1222+
* Background. Note, ACPI specifies a maximum of 7 arguments (0 - 6).
1223+
*
1224+
* For the Threads command, the Number of threads, ID of current
1225+
* thread and Index of current thread inside all them created.
12251226
*/
12261227
char init_args;
12271228
#ifdef ACPI_DEBUGGER
1228-
acpi_object_type arg_types[4];
1229+
acpi_object_type arg_types[ACPI_METHOD_NUM_ARGS];
12291230
#endif
1230-
char *arguments[4];
1231+
char *arguments[ACPI_METHOD_NUM_ARGS];
12311232
char num_threads_str[11];
12321233
char id_of_thread_str[11];
12331234
char index_of_thread_str[11];

drivers/acpi/acpica/acmacros.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@
455455
* the plist contains a set of parens to allow variable-length lists.
456456
* These macros are used for both the debug and non-debug versions of the code.
457457
*/
458-
#define ACPI_ERROR_NAMESPACE(s, e) acpi_ut_namespace_error (AE_INFO, s, e);
458+
#define ACPI_ERROR_NAMESPACE(s, p, e) acpi_ut_prefixed_namespace_error (AE_INFO, s, p, e);
459459
#define ACPI_ERROR_METHOD(s, n, p, e) acpi_ut_method_error (AE_INFO, s, n, p, e);
460460
#define ACPI_WARN_PREDEFINED(plist) acpi_ut_predefined_warning plist
461461
#define ACPI_INFO_PREDEFINED(plist) acpi_ut_predefined_info plist

drivers/acpi/acpica/acnamesp.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,9 @@ acpi_ns_build_normalized_path(struct acpi_namespace_node *node,
289289
char *acpi_ns_get_normalized_pathname(struct acpi_namespace_node *node,
290290
u8 no_trailing);
291291

292+
char *acpi_ns_build_prefixed_pathname(union acpi_generic_state *prefix_scope,
293+
const char *internal_path);
294+
292295
char *acpi_ns_name_of_current_scope(struct acpi_walk_state *walk_state);
293296

294297
acpi_status

drivers/acpi/acpica/acutils.h

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ extern const char *acpi_gbl_ptyp_decode[];
118118
#ifndef ACPI_MSG_ERROR
119119
#define ACPI_MSG_ERROR "ACPI Error: "
120120
#endif
121-
#ifndef ACPI_MSG_EXCEPTION
122-
#define ACPI_MSG_EXCEPTION "ACPI Exception: "
123-
#endif
124121
#ifndef ACPI_MSG_WARNING
125122
#define ACPI_MSG_WARNING "ACPI Warning: "
126123
#endif
@@ -129,10 +126,10 @@ extern const char *acpi_gbl_ptyp_decode[];
129126
#endif
130127

131128
#ifndef ACPI_MSG_BIOS_ERROR
132-
#define ACPI_MSG_BIOS_ERROR "ACPI BIOS Error (bug): "
129+
#define ACPI_MSG_BIOS_ERROR "Firmware Error (ACPI): "
133130
#endif
134131
#ifndef ACPI_MSG_BIOS_WARNING
135-
#define ACPI_MSG_BIOS_WARNING "ACPI BIOS Warning (bug): "
132+
#define ACPI_MSG_BIOS_WARNING "Firmware Warning (ACPI): "
136133
#endif
137134

138135
/*
@@ -233,10 +230,10 @@ u64 acpi_ut_implicit_strtoul64(char *string);
233230
*/
234231
acpi_status acpi_ut_init_globals(void);
235232

236-
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
237-
238233
const char *acpi_ut_get_mutex_name(u32 mutex_id);
239234

235+
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
236+
240237
const char *acpi_ut_get_notify_name(u32 notify_value, acpi_object_type type);
241238
#endif
242239

@@ -641,9 +638,11 @@ void ut_convert_backslashes(char *pathname);
641638

642639
void acpi_ut_repair_name(char *name);
643640

644-
#if defined (ACPI_DEBUGGER) || defined (ACPI_APPLICATION)
641+
#if defined (ACPI_DEBUGGER) || defined (ACPI_APPLICATION) || defined (ACPI_DEBUG_OUTPUT)
645642
u8 acpi_ut_safe_strcpy(char *dest, acpi_size dest_size, char *source);
646643

644+
void acpi_ut_safe_strncpy(char *dest, char *source, acpi_size dest_size);
645+
647646
u8 acpi_ut_safe_strcat(char *dest, acpi_size dest_size, char *source);
648647

649648
u8
@@ -737,9 +736,11 @@ acpi_ut_predefined_bios_error(const char *module_name,
737736
u8 node_flags, const char *format, ...);
738737

739738
void
740-
acpi_ut_namespace_error(const char *module_name,
741-
u32 line_number,
742-
const char *internal_name, acpi_status lookup_status);
739+
acpi_ut_prefixed_namespace_error(const char *module_name,
740+
u32 line_number,
741+
union acpi_generic_state *prefix_scope,
742+
const char *internal_name,
743+
acpi_status lookup_status);
743744

744745
void
745746
acpi_ut_method_error(const char *module_name,

0 commit comments

Comments
 (0)