aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2018-01-03 18:06:24 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-01-04 19:33:22 -0500
commit2cb0ba70fbbf36f34c2c31fabe19a267ac4a14a3 (patch)
treed839ca2bca1d5b79bae93403b216b00edccf2e18
parent6e875fa0480c16a881564a718686d517ae1ad3ad (diff)
ACPICA: Cleanup the global variables and update comments
ACPICA commit 8519ba376636565350c3fa0db5621c61d34c34b2 Mostly cleanup/reformatting. Some restructuring. No functional change. Link: https://github.com/acpica/acpica/commit/8519ba37 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/acpica/acglobal.h82
-rw-r--r--drivers/acpi/acpica/utdebug.c2
2 files changed, 29 insertions, 55 deletions
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
index 95eed442703f..0c609f803ee1 100644
--- a/drivers/acpi/acpica/acglobal.h
+++ b/drivers/acpi/acpica/acglobal.h
@@ -46,7 +46,7 @@
46 46
47/***************************************************************************** 47/*****************************************************************************
48 * 48 *
49 * Globals related to the ACPI tables 49 * Globals related to the incoming ACPI tables
50 * 50 *
51 ****************************************************************************/ 51 ****************************************************************************/
52 52
@@ -87,7 +87,7 @@ ACPI_GLOBAL(u8, acpi_gbl_integer_nybble_width);
87 87
88/***************************************************************************** 88/*****************************************************************************
89 * 89 *
90 * Mutual exclusion within ACPICA subsystem 90 * Mutual exclusion within the ACPICA subsystem
91 * 91 *
92 ****************************************************************************/ 92 ****************************************************************************/
93 93
@@ -167,7 +167,7 @@ ACPI_GLOBAL(u8, acpi_gbl_next_owner_id_offset);
167 167
168ACPI_INIT_GLOBAL(u8, acpi_gbl_namespace_initialized, FALSE); 168ACPI_INIT_GLOBAL(u8, acpi_gbl_namespace_initialized, FALSE);
169 169
170/* Misc */ 170/* Miscellaneous */
171 171
172ACPI_GLOBAL(u32, acpi_gbl_original_mode); 172ACPI_GLOBAL(u32, acpi_gbl_original_mode);
173ACPI_GLOBAL(u32, acpi_gbl_ns_lookup_count); 173ACPI_GLOBAL(u32, acpi_gbl_ns_lookup_count);
@@ -191,10 +191,9 @@ extern const char acpi_gbl_lower_hex_digits[];
191extern const char acpi_gbl_upper_hex_digits[]; 191extern const char acpi_gbl_upper_hex_digits[];
192extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES]; 192extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES];
193 193
194#ifdef ACPI_DBG_TRACK_ALLOCATIONS
195
196/* Lists for tracking memory allocations (debug only) */ 194/* Lists for tracking memory allocations (debug only) */
197 195
196#ifdef ACPI_DBG_TRACK_ALLOCATIONS
198ACPI_GLOBAL(struct acpi_memory_list *, acpi_gbl_global_list); 197ACPI_GLOBAL(struct acpi_memory_list *, acpi_gbl_global_list);
199ACPI_GLOBAL(struct acpi_memory_list *, acpi_gbl_ns_node_list); 198ACPI_GLOBAL(struct acpi_memory_list *, acpi_gbl_ns_node_list);
200ACPI_GLOBAL(u8, acpi_gbl_display_final_mem_stats); 199ACPI_GLOBAL(u8, acpi_gbl_display_final_mem_stats);
@@ -203,7 +202,7 @@ ACPI_GLOBAL(u8, acpi_gbl_disable_mem_tracking);
203 202
204/***************************************************************************** 203/*****************************************************************************
205 * 204 *
206 * Namespace globals 205 * ACPI Namespace
207 * 206 *
208 ****************************************************************************/ 207 ****************************************************************************/
209 208
@@ -234,15 +233,20 @@ ACPI_INIT_GLOBAL(u32, acpi_gbl_nesting_level, 0);
234 233
235/***************************************************************************** 234/*****************************************************************************
236 * 235 *
237 * Interpreter globals 236 * Interpreter/Parser globals
238 * 237 *
239 ****************************************************************************/ 238 ****************************************************************************/
240 239
241ACPI_GLOBAL(struct acpi_thread_state *, acpi_gbl_current_walk_list);
242
243/* Control method single step flag */ 240/* Control method single step flag */
244 241
245ACPI_GLOBAL(u8, acpi_gbl_cm_single_step); 242ACPI_GLOBAL(u8, acpi_gbl_cm_single_step);
243ACPI_GLOBAL(struct acpi_thread_state *, acpi_gbl_current_walk_list);
244ACPI_INIT_GLOBAL(union acpi_parse_object, *acpi_gbl_current_scope, NULL);
245
246/* ASL/ASL+ converter */
247
248ACPI_INIT_GLOBAL(u8, gbl_capture_comments, FALSE);
249ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_last_list_head, NULL);
246 250
247/***************************************************************************** 251/*****************************************************************************
248 * 252 *
@@ -252,7 +256,6 @@ ACPI_GLOBAL(u8, acpi_gbl_cm_single_step);
252 256
253extern struct acpi_bit_register_info 257extern struct acpi_bit_register_info
254 acpi_gbl_bit_register_info[ACPI_NUM_BITREG]; 258 acpi_gbl_bit_register_info[ACPI_NUM_BITREG];
255
256ACPI_GLOBAL(u8, acpi_gbl_sleep_type_a); 259ACPI_GLOBAL(u8, acpi_gbl_sleep_type_a);
257ACPI_GLOBAL(u8, acpi_gbl_sleep_type_b); 260ACPI_GLOBAL(u8, acpi_gbl_sleep_type_b);
258 261
@@ -263,7 +266,6 @@ ACPI_GLOBAL(u8, acpi_gbl_sleep_type_b);
263 ****************************************************************************/ 266 ****************************************************************************/
264 267
265#if (!ACPI_REDUCED_HARDWARE) 268#if (!ACPI_REDUCED_HARDWARE)
266
267ACPI_GLOBAL(u8, acpi_gbl_all_gpes_initialized); 269ACPI_GLOBAL(u8, acpi_gbl_all_gpes_initialized);
268ACPI_GLOBAL(struct acpi_gpe_xrupt_info *, acpi_gbl_gpe_xrupt_list_head); 270ACPI_GLOBAL(struct acpi_gpe_xrupt_info *, acpi_gbl_gpe_xrupt_list_head);
269ACPI_GLOBAL(struct acpi_gpe_block_info *, 271ACPI_GLOBAL(struct acpi_gpe_block_info *,
@@ -272,10 +274,8 @@ ACPI_GLOBAL(acpi_gbl_event_handler, acpi_gbl_global_event_handler);
272ACPI_GLOBAL(void *, acpi_gbl_global_event_handler_context); 274ACPI_GLOBAL(void *, acpi_gbl_global_event_handler_context);
273ACPI_GLOBAL(struct acpi_fixed_event_handler, 275ACPI_GLOBAL(struct acpi_fixed_event_handler,
274 acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS]); 276 acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS]);
275
276extern struct acpi_fixed_event_info 277extern struct acpi_fixed_event_info
277 acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS]; 278 acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS];
278
279#endif /* !ACPI_REDUCED_HARDWARE */ 279#endif /* !ACPI_REDUCED_HARDWARE */
280 280
281/***************************************************************************** 281/*****************************************************************************
@@ -291,14 +291,14 @@ ACPI_GLOBAL(u32, acpi_gpe_count);
291ACPI_GLOBAL(u32, acpi_sci_count); 291ACPI_GLOBAL(u32, acpi_sci_count);
292ACPI_GLOBAL(u32, acpi_fixed_event_count[ACPI_NUM_FIXED_EVENTS]); 292ACPI_GLOBAL(u32, acpi_fixed_event_count[ACPI_NUM_FIXED_EVENTS]);
293 293
294/* Support for dynamic control method tracing mechanism */ 294/* Dynamic control method tracing mechanism */
295 295
296ACPI_GLOBAL(u32, acpi_gbl_original_dbg_level); 296ACPI_GLOBAL(u32, acpi_gbl_original_dbg_level);
297ACPI_GLOBAL(u32, acpi_gbl_original_dbg_layer); 297ACPI_GLOBAL(u32, acpi_gbl_original_dbg_layer);
298 298
299/***************************************************************************** 299/*****************************************************************************
300 * 300 *
301 * Debugger and Disassembler globals 301 * Debugger and Disassembler
302 * 302 *
303 ****************************************************************************/ 303 ****************************************************************************/
304 304
@@ -326,7 +326,6 @@ ACPI_GLOBAL(struct acpi_external_file *, acpi_gbl_external_file_list);
326#endif 326#endif
327 327
328#ifdef ACPI_DEBUGGER 328#ifdef ACPI_DEBUGGER
329
330ACPI_INIT_GLOBAL(u8, acpi_gbl_abort_method, FALSE); 329ACPI_INIT_GLOBAL(u8, acpi_gbl_abort_method, FALSE);
331ACPI_INIT_GLOBAL(acpi_thread_id, acpi_gbl_db_thread_id, ACPI_INVALID_THREAD_ID); 330ACPI_INIT_GLOBAL(acpi_thread_id, acpi_gbl_db_thread_id, ACPI_INVALID_THREAD_ID);
332 331
@@ -340,7 +339,6 @@ ACPI_GLOBAL(u32, acpi_gbl_db_console_debug_level);
340ACPI_GLOBAL(struct acpi_namespace_node *, acpi_gbl_db_scope_node); 339ACPI_GLOBAL(struct acpi_namespace_node *, acpi_gbl_db_scope_node);
341ACPI_GLOBAL(u8, acpi_gbl_db_terminate_loop); 340ACPI_GLOBAL(u8, acpi_gbl_db_terminate_loop);
342ACPI_GLOBAL(u8, acpi_gbl_db_threads_terminated); 341ACPI_GLOBAL(u8, acpi_gbl_db_threads_terminated);
343
344ACPI_GLOBAL(char *, acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS]); 342ACPI_GLOBAL(char *, acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS]);
345ACPI_GLOBAL(acpi_object_type, acpi_gbl_db_arg_types[ACPI_DEBUGGER_MAX_ARGS]); 343ACPI_GLOBAL(acpi_object_type, acpi_gbl_db_arg_types[ACPI_DEBUGGER_MAX_ARGS]);
346 344
@@ -350,32 +348,33 @@ ACPI_GLOBAL(char, acpi_gbl_db_parsed_buf[ACPI_DB_LINE_BUFFER_SIZE]);
350ACPI_GLOBAL(char, acpi_gbl_db_scope_buf[ACPI_DB_LINE_BUFFER_SIZE]); 348ACPI_GLOBAL(char, acpi_gbl_db_scope_buf[ACPI_DB_LINE_BUFFER_SIZE]);
351ACPI_GLOBAL(char, acpi_gbl_db_debug_filename[ACPI_DB_LINE_BUFFER_SIZE]); 349ACPI_GLOBAL(char, acpi_gbl_db_debug_filename[ACPI_DB_LINE_BUFFER_SIZE]);
352 350
353/* 351/* Statistics globals */
354 * Statistic globals 352
355 */
356ACPI_GLOBAL(u16, acpi_gbl_obj_type_count[ACPI_TOTAL_TYPES]); 353ACPI_GLOBAL(u16, acpi_gbl_obj_type_count[ACPI_TOTAL_TYPES]);
357ACPI_GLOBAL(u16, acpi_gbl_node_type_count[ACPI_TOTAL_TYPES]); 354ACPI_GLOBAL(u16, acpi_gbl_node_type_count[ACPI_TOTAL_TYPES]);
358ACPI_GLOBAL(u16, acpi_gbl_obj_type_count_misc); 355ACPI_GLOBAL(u16, acpi_gbl_obj_type_count_misc);
359ACPI_GLOBAL(u16, acpi_gbl_node_type_count_misc); 356ACPI_GLOBAL(u16, acpi_gbl_node_type_count_misc);
360ACPI_GLOBAL(u32, acpi_gbl_num_nodes); 357ACPI_GLOBAL(u32, acpi_gbl_num_nodes);
361ACPI_GLOBAL(u32, acpi_gbl_num_objects); 358ACPI_GLOBAL(u32, acpi_gbl_num_objects);
362
363#endif /* ACPI_DEBUGGER */ 359#endif /* ACPI_DEBUGGER */
364 360
365#if defined (ACPI_DISASSEMBLER) || defined (ACPI_ASL_COMPILER) 361#if defined (ACPI_DISASSEMBLER) || defined (ACPI_ASL_COMPILER)
366
367ACPI_GLOBAL(const char, *acpi_gbl_pld_panel_list[]); 362ACPI_GLOBAL(const char, *acpi_gbl_pld_panel_list[]);
368ACPI_GLOBAL(const char, *acpi_gbl_pld_vertical_position_list[]); 363ACPI_GLOBAL(const char, *acpi_gbl_pld_vertical_position_list[]);
369ACPI_GLOBAL(const char, *acpi_gbl_pld_horizontal_position_list[]); 364ACPI_GLOBAL(const char, *acpi_gbl_pld_horizontal_position_list[]);
370ACPI_GLOBAL(const char, *acpi_gbl_pld_shape_list[]); 365ACPI_GLOBAL(const char, *acpi_gbl_pld_shape_list[]);
371
372ACPI_INIT_GLOBAL(u8, acpi_gbl_disasm_flag, FALSE); 366ACPI_INIT_GLOBAL(u8, acpi_gbl_disasm_flag, FALSE);
373
374#endif 367#endif
375 368
376/* 369/*****************************************************************************
377 * Meant for the -ca option. 370 *
378 */ 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
379ACPI_INIT_GLOBAL(char *, acpi_gbl_current_inline_comment, NULL); 378ACPI_INIT_GLOBAL(char *, acpi_gbl_current_inline_comment, NULL);
380ACPI_INIT_GLOBAL(char *, acpi_gbl_current_end_node_comment, NULL); 379ACPI_INIT_GLOBAL(char *, acpi_gbl_current_end_node_comment, NULL);
381ACPI_INIT_GLOBAL(char *, acpi_gbl_current_open_brace_comment, NULL); 380ACPI_INIT_GLOBAL(char *, acpi_gbl_current_open_brace_comment, NULL);
@@ -386,23 +385,18 @@ ACPI_INIT_GLOBAL(char *, acpi_gbl_current_filename, NULL);
386ACPI_INIT_GLOBAL(char *, acpi_gbl_current_parent_filename, NULL); 385ACPI_INIT_GLOBAL(char *, acpi_gbl_current_parent_filename, NULL);
387ACPI_INIT_GLOBAL(char *, acpi_gbl_current_include_filename, NULL); 386ACPI_INIT_GLOBAL(char *, acpi_gbl_current_include_filename, NULL);
388 387
389ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_last_list_head, NULL);
390
391ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_def_blk_comment_list_head, 388ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_def_blk_comment_list_head,
392 NULL); 389 NULL);
393ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_def_blk_comment_list_tail, 390ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_def_blk_comment_list_tail,
394 NULL); 391 NULL);
395
396ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_reg_comment_list_head, 392ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_reg_comment_list_head,
397 NULL); 393 NULL);
398ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_reg_comment_list_tail, 394ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_reg_comment_list_tail,
399 NULL); 395 NULL);
400
401ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_inc_comment_list_head, 396ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_inc_comment_list_head,
402 NULL); 397 NULL);
403ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_inc_comment_list_tail, 398ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_inc_comment_list_tail,
404 NULL); 399 NULL);
405
406ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_end_blk_comment_list_head, 400ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_end_blk_comment_list_head,
407 NULL); 401 NULL);
408ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_end_blk_comment_list_tail, 402ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_end_blk_comment_list_tail,
@@ -410,30 +404,18 @@ ACPI_INIT_GLOBAL(struct acpi_comment_node, *acpi_gbl_end_blk_comment_list_tail,
410 404
411ACPI_INIT_GLOBAL(struct acpi_comment_addr_node, 405ACPI_INIT_GLOBAL(struct acpi_comment_addr_node,
412 *acpi_gbl_comment_addr_list_head, NULL); 406 *acpi_gbl_comment_addr_list_head, NULL);
413
414ACPI_INIT_GLOBAL(union acpi_parse_object, *acpi_gbl_current_scope, NULL);
415
416ACPI_INIT_GLOBAL(struct acpi_file_node, *acpi_gbl_file_tree_root, NULL); 407ACPI_INIT_GLOBAL(struct acpi_file_node, *acpi_gbl_file_tree_root, NULL);
417 408
418ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_reg_comment_cache); 409ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_reg_comment_cache);
419ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_comment_addr_cache); 410ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_comment_addr_cache);
420ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_file_cache); 411ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_file_cache);
421 412
422ACPI_INIT_GLOBAL(u8, gbl_capture_comments, FALSE);
423
424ACPI_INIT_GLOBAL(u8, acpi_gbl_debug_asl_conversion, FALSE); 413ACPI_INIT_GLOBAL(u8, acpi_gbl_debug_asl_conversion, FALSE);
425ACPI_INIT_GLOBAL(ACPI_FILE, acpi_gbl_conv_debug_file, NULL); 414ACPI_INIT_GLOBAL(ACPI_FILE, acpi_gbl_conv_debug_file, NULL);
426
427ACPI_GLOBAL(char, acpi_gbl_table_sig[4]); 415ACPI_GLOBAL(char, acpi_gbl_table_sig[4]);
428 416#endif
429/*****************************************************************************
430 *
431 * Application globals
432 *
433 ****************************************************************************/
434 417
435#ifdef ACPI_APPLICATION 418#ifdef ACPI_APPLICATION
436
437ACPI_INIT_GLOBAL(ACPI_FILE, acpi_gbl_debug_file, NULL); 419ACPI_INIT_GLOBAL(ACPI_FILE, acpi_gbl_debug_file, NULL);
438ACPI_INIT_GLOBAL(ACPI_FILE, acpi_gbl_output_file, NULL); 420ACPI_INIT_GLOBAL(ACPI_FILE, acpi_gbl_output_file, NULL);
439ACPI_INIT_GLOBAL(u8, acpi_gbl_debug_timeout, FALSE); 421ACPI_INIT_GLOBAL(u8, acpi_gbl_debug_timeout, FALSE);
@@ -442,16 +424,6 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_debug_timeout, FALSE);
442 424
443ACPI_GLOBAL(acpi_spinlock, acpi_gbl_print_lock); /* For print buffer */ 425ACPI_GLOBAL(acpi_spinlock, acpi_gbl_print_lock); /* For print buffer */
444ACPI_GLOBAL(char, acpi_gbl_print_buffer[1024]); 426ACPI_GLOBAL(char, acpi_gbl_print_buffer[1024]);
445
446#endif /* ACPI_APPLICATION */ 427#endif /* ACPI_APPLICATION */
447 428
448/*****************************************************************************
449 *
450 * Info/help support
451 *
452 ****************************************************************************/
453
454extern const struct ah_predefined_name asl_predefined_info[];
455extern const struct ah_device_id asl_device_ids[];
456
457#endif /* __ACGLOBAL_H__ */ 429#endif /* __ACGLOBAL_H__ */
diff --git a/drivers/acpi/acpica/utdebug.c b/drivers/acpi/acpica/utdebug.c
index d4dfdbb539ee..cff7154b7fee 100644
--- a/drivers/acpi/acpica/utdebug.c
+++ b/drivers/acpi/acpica/utdebug.c
@@ -163,7 +163,9 @@ acpi_debug_print(u32 requested_debug_level,
163{ 163{
164 acpi_thread_id thread_id; 164 acpi_thread_id thread_id;
165 va_list args; 165 va_list args;
166#ifdef ACPI_APPLICATION
166 int fill_count; 167 int fill_count;
168#endif
167 169
168 /* Check if debug output enabled */ 170 /* Check if debug output enabled */
169 171