diff options
author | Lv Zheng <lv.zheng@intel.com> | 2012-10-30 22:25:15 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-11-14 18:31:22 -0500 |
commit | f540fadf29a6987efbfa7daf10976935fd59ae7c (patch) | |
tree | 689bd40f202ba7d5e664d5c1188b1296cfdd37be /drivers/acpi/acpica | |
parent | 6d33b6be17dd6a0934396704f969ceb7f3206347 (diff) |
ACPICA: Fix unmerged debugger divergences.
Debugger improvements in ACPICA are always ignored by ACPICA Linux
release. This will lead to divergences between Linux and ACPICA.
This patch fixes such unmerged debugger updates.
Following patches are included:
1. Fixed a couple compiler warnings for extra extern
Wed, 14 Mar 2007 21:12:19 +0000
2. Cleanup for internal Reference Object.
Wed, 27 Aug 2008 10:11:30 -0700
3. Debugger: Lock method args for multithread command.
Fri, 24 Apr 2009 12:28:49 -0700
4. Debugger: Add max count argument for Batch command.
Tue, 29 Sep 2009 12:31:58 -0700
5. Add new host interfaces for _OSI support.
Thu, 5 Aug 2010 14:18:28 -0700
6. Increase debugger buffer size for method return objects.
Wed, 17 Nov 2010 13:48:30 -0800
7. Debugger: Add command to display status of global handlers.
Tue, 25 Jan 2011 13:47:58 -0800
8. Debugger: Split large dbcmds.c file.
Wed, 26 Jan 2011 13:03:41 -0800
9. Debugger/AcpiExec: Add support to pass complex args to methods.
Tue, 17 May 2011 13:33:39 -0700
10.Debugger: Add Template command to dump resource templates.
Fri, 28 Oct 2011 14:18:51 -0700
11.Support for custom ACPICA build for ACPI 5.0 reduced hardware.
Wed, 1 Feb 2012 13:18:17 -0800
12.Debugger: Improve command help support.
Wed, 15 Feb 2012 07:59:26 -0800
13.Update ACPI_HW_DEPENDENT* macro invocations.
Wed, 15 Feb 2012 08:14:08 -0800
14.Debugger: Rename function to simplify source code conversion.
Wed, 13 Jun 2012 14:23:06 -0700
15.Debugger: Enhance "Tables" and "Unload" commands.
Fri, 29 Jun 2012 13:10:58 -0700
16.Debugger: update prototype for AcpiDbSleep function.
Fri, 17 Aug 2012 13:43:02 -0700
This patch will not affect the generated vmlinx binary.
This will decrease 264 lines of 20120913 divergence.diff.
Signed-off-by: Robert Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica')
-rw-r--r-- | drivers/acpi/acpica/acdebug.h | 94 | ||||
-rw-r--r-- | drivers/acpi/acpica/acglobal.h | 69 | ||||
-rw-r--r-- | drivers/acpi/acpica/aclocal.h | 2 |
3 files changed, 100 insertions, 65 deletions
diff --git a/drivers/acpi/acpica/acdebug.h b/drivers/acpi/acpica/acdebug.h index 5e8abb07724f..432a318c9ed1 100644 --- a/drivers/acpi/acpica/acdebug.h +++ b/drivers/acpi/acpica/acdebug.h | |||
@@ -44,17 +44,28 @@ | |||
44 | #ifndef __ACDEBUG_H__ | 44 | #ifndef __ACDEBUG_H__ |
45 | #define __ACDEBUG_H__ | 45 | #define __ACDEBUG_H__ |
46 | 46 | ||
47 | #define ACPI_DEBUG_BUFFER_SIZE 4196 | 47 | #define ACPI_DEBUG_BUFFER_SIZE 0x4000 /* 16K buffer for return objects */ |
48 | 48 | ||
49 | struct command_info { | 49 | struct acpi_db_command_info { |
50 | char *name; /* Command Name */ | 50 | char *name; /* Command Name */ |
51 | u8 min_args; /* Minimum arguments required */ | 51 | u8 min_args; /* Minimum arguments required */ |
52 | }; | 52 | }; |
53 | 53 | ||
54 | struct argument_info { | 54 | struct acpi_db_command_help { |
55 | u8 line_count; /* Number of help lines */ | ||
56 | char *invocation; /* Command Invocation */ | ||
57 | char *description; /* Command Description */ | ||
58 | }; | ||
59 | |||
60 | struct acpi_db_argument_info { | ||
55 | char *name; /* Argument Name */ | 61 | char *name; /* Argument Name */ |
56 | }; | 62 | }; |
57 | 63 | ||
64 | struct acpi_db_execute_walk { | ||
65 | u32 count; | ||
66 | u32 max_count; | ||
67 | }; | ||
68 | |||
58 | #define PARAM_LIST(pl) pl | 69 | #define PARAM_LIST(pl) pl |
59 | #define DBTEST_OUTPUT_LEVEL(lvl) if (acpi_gbl_db_opt_verbose) | 70 | #define DBTEST_OUTPUT_LEVEL(lvl) if (acpi_gbl_db_opt_verbose) |
60 | #define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\ | 71 | #define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\ |
@@ -77,59 +88,71 @@ acpi_db_single_step(struct acpi_walk_state *walk_state, | |||
77 | /* | 88 | /* |
78 | * dbcmds - debug commands and output routines | 89 | * dbcmds - debug commands and output routines |
79 | */ | 90 | */ |
80 | acpi_status acpi_db_disassemble_method(char *name); | 91 | struct acpi_namespace_node *acpi_db_convert_to_node(char *in_string); |
81 | 92 | ||
82 | void acpi_db_display_table_info(char *table_arg); | 93 | void acpi_db_display_table_info(char *table_arg); |
83 | 94 | ||
84 | void acpi_db_unload_acpi_table(char *table_arg, char *instance_arg); | 95 | void acpi_db_display_template(char *buffer_arg); |
85 | 96 | ||
86 | void | 97 | void acpi_db_unload_acpi_table(char *name); |
87 | acpi_db_set_method_breakpoint(char *location, | ||
88 | struct acpi_walk_state *walk_state, | ||
89 | union acpi_parse_object *op); | ||
90 | 98 | ||
91 | void acpi_db_set_method_call_breakpoint(union acpi_parse_object *op); | 99 | void acpi_db_send_notify(char *name, u32 value); |
92 | 100 | ||
93 | void acpi_db_get_bus_info(void); | 101 | void acpi_db_display_interfaces(char *action_arg, char *interface_name_arg); |
94 | 102 | ||
95 | void acpi_db_disassemble_aml(char *statements, union acpi_parse_object *op); | 103 | acpi_status acpi_db_sleep(char *object_arg); |
96 | 104 | ||
97 | void acpi_db_dump_namespace(char *start_arg, char *depth_arg); | 105 | void acpi_db_display_locks(void); |
98 | 106 | ||
99 | void acpi_db_dump_namespace_by_owner(char *owner_arg, char *depth_arg); | 107 | void acpi_db_display_resources(char *object_arg); |
100 | 108 | ||
101 | void acpi_db_send_notify(char *name, u32 value); | 109 | ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_db_display_gpes(void)) |
110 | |||
111 | void acpi_db_display_handlers(void); | ||
112 | |||
113 | ACPI_HW_DEPENDENT_RETURN_VOID(void | ||
114 | acpi_db_generate_gpe(char *gpe_arg, | ||
115 | char *block_arg)) | ||
116 | |||
117 | /* | ||
118 | * dbmethod - control method commands | ||
119 | */ | ||
120 | void | ||
121 | acpi_db_set_method_breakpoint(char *location, | ||
122 | struct acpi_walk_state *walk_state, | ||
123 | union acpi_parse_object *op); | ||
124 | |||
125 | void acpi_db_set_method_call_breakpoint(union acpi_parse_object *op); | ||
102 | 126 | ||
103 | void acpi_db_set_method_data(char *type_arg, char *index_arg, char *value_arg); | 127 | void acpi_db_set_method_data(char *type_arg, char *index_arg, char *value_arg); |
104 | 128 | ||
105 | acpi_status | 129 | acpi_status acpi_db_disassemble_method(char *name); |
106 | acpi_db_display_objects(char *obj_type_arg, char *display_count_arg); | ||
107 | 130 | ||
108 | void acpi_db_display_interfaces(char *action_arg, char *interface_name_arg); | 131 | void acpi_db_disassemble_aml(char *statements, union acpi_parse_object *op); |
109 | 132 | ||
110 | acpi_status acpi_db_find_name_in_namespace(char *name_arg); | 133 | void acpi_db_batch_execute(char *count_arg); |
111 | 134 | ||
135 | /* | ||
136 | * dbnames - namespace commands | ||
137 | */ | ||
112 | void acpi_db_set_scope(char *name); | 138 | void acpi_db_set_scope(char *name); |
113 | 139 | ||
114 | ACPI_HW_DEPENDENT_RETURN_OK(acpi_status acpi_db_sleep(char *object_arg)) | 140 | void acpi_db_dump_namespace(char *start_arg, char *depth_arg); |
115 | 141 | ||
116 | void acpi_db_find_references(char *object_arg); | 142 | void acpi_db_dump_namespace_by_owner(char *owner_arg, char *depth_arg); |
117 | 143 | ||
118 | void acpi_db_display_locks(void); | 144 | acpi_status acpi_db_find_name_in_namespace(char *name_arg); |
119 | 145 | ||
120 | void acpi_db_display_resources(char *object_arg); | 146 | void acpi_db_check_predefined_names(void); |
121 | 147 | ||
122 | ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_db_display_gpes(void)) | 148 | acpi_status |
149 | acpi_db_display_objects(char *obj_type_arg, char *display_count_arg); | ||
123 | 150 | ||
124 | void acpi_db_check_integrity(void); | 151 | void acpi_db_check_integrity(void); |
125 | 152 | ||
126 | ACPI_HW_DEPENDENT_RETURN_VOID(void | 153 | void acpi_db_find_references(char *object_arg); |
127 | acpi_db_generate_gpe(char *gpe_arg, | ||
128 | char *block_arg)) | ||
129 | |||
130 | void acpi_db_check_predefined_names(void); | ||
131 | 154 | ||
132 | void acpi_db_batch_execute(void); | 155 | void acpi_db_get_bus_info(void); |
133 | 156 | ||
134 | /* | 157 | /* |
135 | * dbdisply - debug display commands | 158 | * dbdisply - debug display commands |
@@ -161,7 +184,8 @@ acpi_db_display_argument_object(union acpi_operand_object *obj_desc, | |||
161 | /* | 184 | /* |
162 | * dbexec - debugger control method execution | 185 | * dbexec - debugger control method execution |
163 | */ | 186 | */ |
164 | void acpi_db_execute(char *name, char **args, u32 flags); | 187 | void |
188 | acpi_db_execute(char *name, char **args, acpi_object_type * types, u32 flags); | ||
165 | 189 | ||
166 | void | 190 | void |
167 | acpi_db_create_execution_threads(char *num_threads_arg, | 191 | acpi_db_create_execution_threads(char *num_threads_arg, |
@@ -175,7 +199,8 @@ u32 acpi_db_get_cache_info(struct acpi_memory_list *cache); | |||
175 | * dbfileio - Debugger file I/O commands | 199 | * dbfileio - Debugger file I/O commands |
176 | */ | 200 | */ |
177 | acpi_object_type | 201 | acpi_object_type |
178 | acpi_db_match_argument(char *user_argument, struct argument_info *arguments); | 202 | acpi_db_match_argument(char *user_argument, |
203 | struct acpi_db_argument_info *arguments); | ||
179 | 204 | ||
180 | void acpi_db_close_debug_file(void); | 205 | void acpi_db_close_debug_file(void); |
181 | 206 | ||
@@ -208,6 +233,11 @@ acpi_db_command_dispatch(char *input_buffer, | |||
208 | 233 | ||
209 | void ACPI_SYSTEM_XFACE acpi_db_execute_thread(void *context); | 234 | void ACPI_SYSTEM_XFACE acpi_db_execute_thread(void *context); |
210 | 235 | ||
236 | acpi_status acpi_db_user_commands(char prompt, union acpi_parse_object *op); | ||
237 | |||
238 | char *acpi_db_get_next_token(char *string, | ||
239 | char **next, acpi_object_type * return_type); | ||
240 | |||
211 | /* | 241 | /* |
212 | * dbstats - Generation and display of ACPI table statistics | 242 | * dbstats - Generation and display of ACPI table statistics |
213 | */ | 243 | */ |
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h index ce79100fb5eb..fe20e186ca10 100644 --- a/drivers/acpi/acpica/acglobal.h +++ b/drivers/acpi/acpica/acglobal.h | |||
@@ -155,26 +155,6 @@ ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_no_resource_disassembly, FALSE); | |||
155 | 155 | ||
156 | /***************************************************************************** | 156 | /***************************************************************************** |
157 | * | 157 | * |
158 | * Debug support | ||
159 | * | ||
160 | ****************************************************************************/ | ||
161 | |||
162 | /* Procedure nesting level for debug output */ | ||
163 | |||
164 | extern u32 acpi_gbl_nesting_level; | ||
165 | |||
166 | ACPI_EXTERN u32 acpi_gpe_count; | ||
167 | ACPI_EXTERN u32 acpi_fixed_event_count[ACPI_NUM_FIXED_EVENTS]; | ||
168 | |||
169 | /* Support for dynamic control method tracing mechanism */ | ||
170 | |||
171 | ACPI_EXTERN u32 acpi_gbl_original_dbg_level; | ||
172 | ACPI_EXTERN u32 acpi_gbl_original_dbg_layer; | ||
173 | ACPI_EXTERN u32 acpi_gbl_trace_dbg_level; | ||
174 | ACPI_EXTERN u32 acpi_gbl_trace_dbg_layer; | ||
175 | |||
176 | /***************************************************************************** | ||
177 | * | ||
178 | * ACPI Table globals | 158 | * ACPI Table globals |
179 | * | 159 | * |
180 | ****************************************************************************/ | 160 | ****************************************************************************/ |
@@ -259,15 +239,6 @@ ACPI_EXTERN acpi_spinlock acpi_gbl_hardware_lock; /* For ACPI H/W except GPE reg | |||
259 | * | 239 | * |
260 | ****************************************************************************/ | 240 | ****************************************************************************/ |
261 | 241 | ||
262 | #ifdef ACPI_DBG_TRACK_ALLOCATIONS | ||
263 | |||
264 | /* Lists for tracking memory allocations */ | ||
265 | |||
266 | ACPI_EXTERN struct acpi_memory_list *acpi_gbl_global_list; | ||
267 | ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list; | ||
268 | ACPI_EXTERN u8 acpi_gbl_display_final_mem_stats; | ||
269 | #endif | ||
270 | |||
271 | /* Object caches */ | 242 | /* Object caches */ |
272 | 243 | ||
273 | ACPI_EXTERN acpi_cache_t *acpi_gbl_namespace_cache; | 244 | ACPI_EXTERN acpi_cache_t *acpi_gbl_namespace_cache; |
@@ -326,6 +297,15 @@ extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS]; | |||
326 | 297 | ||
327 | #endif | 298 | #endif |
328 | 299 | ||
300 | #ifdef ACPI_DBG_TRACK_ALLOCATIONS | ||
301 | |||
302 | /* Lists for tracking memory allocations */ | ||
303 | |||
304 | ACPI_EXTERN struct acpi_memory_list *acpi_gbl_global_list; | ||
305 | ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list; | ||
306 | ACPI_EXTERN u8 acpi_gbl_display_final_mem_stats; | ||
307 | #endif | ||
308 | |||
329 | /***************************************************************************** | 309 | /***************************************************************************** |
330 | * | 310 | * |
331 | * Namespace globals | 311 | * Namespace globals |
@@ -403,6 +383,28 @@ ACPI_EXTERN void *acpi_gbl_global_event_handler_context; | |||
403 | 383 | ||
404 | /***************************************************************************** | 384 | /***************************************************************************** |
405 | * | 385 | * |
386 | * Debug support | ||
387 | * | ||
388 | ****************************************************************************/ | ||
389 | |||
390 | /* Procedure nesting level for debug output */ | ||
391 | |||
392 | extern u32 acpi_gbl_nesting_level; | ||
393 | |||
394 | /* Event counters */ | ||
395 | |||
396 | ACPI_EXTERN u32 acpi_gpe_count; | ||
397 | ACPI_EXTERN u32 acpi_fixed_event_count[ACPI_NUM_FIXED_EVENTS]; | ||
398 | |||
399 | /* Support for dynamic control method tracing mechanism */ | ||
400 | |||
401 | ACPI_EXTERN u32 acpi_gbl_original_dbg_level; | ||
402 | ACPI_EXTERN u32 acpi_gbl_original_dbg_layer; | ||
403 | ACPI_EXTERN u32 acpi_gbl_trace_dbg_level; | ||
404 | ACPI_EXTERN u32 acpi_gbl_trace_dbg_layer; | ||
405 | |||
406 | /***************************************************************************** | ||
407 | * | ||
406 | * Debugger globals | 408 | * Debugger globals |
407 | * | 409 | * |
408 | ****************************************************************************/ | 410 | ****************************************************************************/ |
@@ -426,10 +428,11 @@ ACPI_EXTERN u8 acpi_gbl_db_opt_stats; | |||
426 | ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods; | 428 | ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods; |
427 | 429 | ||
428 | ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS]; | 430 | ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS]; |
429 | ACPI_EXTERN char acpi_gbl_db_line_buf[80]; | 431 | ACPI_EXTERN acpi_object_type acpi_gbl_db_arg_types[ACPI_DEBUGGER_MAX_ARGS]; |
430 | ACPI_EXTERN char acpi_gbl_db_parsed_buf[80]; | 432 | ACPI_EXTERN char acpi_gbl_db_line_buf[ACPI_DB_LINE_BUFFER_SIZE]; |
431 | ACPI_EXTERN char acpi_gbl_db_scope_buf[40]; | 433 | ACPI_EXTERN char acpi_gbl_db_parsed_buf[ACPI_DB_LINE_BUFFER_SIZE]; |
432 | ACPI_EXTERN char acpi_gbl_db_debug_filename[40]; | 434 | ACPI_EXTERN char acpi_gbl_db_scope_buf[80]; |
435 | ACPI_EXTERN char acpi_gbl_db_debug_filename[80]; | ||
433 | ACPI_EXTERN u8 acpi_gbl_db_output_to_file; | 436 | ACPI_EXTERN u8 acpi_gbl_db_output_to_file; |
434 | ACPI_EXTERN char *acpi_gbl_db_buffer; | 437 | ACPI_EXTERN char *acpi_gbl_db_buffer; |
435 | ACPI_EXTERN char *acpi_gbl_db_filename; | 438 | ACPI_EXTERN char *acpi_gbl_db_filename; |
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h index c816ee675094..b5a4651cf2b7 100644 --- a/drivers/acpi/acpica/aclocal.h +++ b/drivers/acpi/acpica/aclocal.h | |||
@@ -1031,6 +1031,7 @@ struct acpi_db_method_info { | |||
1031 | acpi_handle method; | 1031 | acpi_handle method; |
1032 | acpi_handle main_thread_gate; | 1032 | acpi_handle main_thread_gate; |
1033 | acpi_handle thread_complete_gate; | 1033 | acpi_handle thread_complete_gate; |
1034 | acpi_handle info_gate; | ||
1034 | acpi_thread_id *threads; | 1035 | acpi_thread_id *threads; |
1035 | u32 num_threads; | 1036 | u32 num_threads; |
1036 | u32 num_created; | 1037 | u32 num_created; |
@@ -1041,6 +1042,7 @@ struct acpi_db_method_info { | |||
1041 | u32 num_loops; | 1042 | u32 num_loops; |
1042 | char pathname[128]; | 1043 | char pathname[128]; |
1043 | char **args; | 1044 | char **args; |
1045 | acpi_object_type *types; | ||
1044 | 1046 | ||
1045 | /* | 1047 | /* |
1046 | * Arguments to be passed to method for the command | 1048 | * Arguments to be passed to method for the command |