Skip to content

Commit 2cb0ba7

Browse files
acpibobrafaeljw
authored andcommitted
ACPICA: Cleanup the global variables and update comments
ACPICA commit 8519ba376636565350c3fa0db5621c61d34c34b2 Mostly cleanup/reformatting. Some restructuring. No functional change. Link: acpica/acpica@8519ba37 Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Erik Schmauss <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 6e875fa commit 2cb0ba7

File tree

2 files changed

+29
-55
lines changed

2 files changed

+29
-55
lines changed

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, 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/utdebug.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ acpi_debug_print(u32 requested_debug_level,
163163
{
164164
acpi_thread_id thread_id;
165165
va_list args;
166+
#ifdef ACPI_APPLICATION
166167
int fill_count;
168+
#endif
167169

168170
/* Check if debug output enabled */
169171

0 commit comments

Comments
 (0)