aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/parser
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2006-05-26 16:36:00 -0400
committerLen Brown <len.brown@intel.com>2006-06-14 02:44:35 -0400
commit4119532c95547821dbe72d6916dfa1b2148475b3 (patch)
tree564eb8f69924fb7dc72e93526faf1547acac7d30 /drivers/acpi/parser
parentb8d35192c55fb055792ff0641408eaaec7c88988 (diff)
ACPI: ACPICA 20060526
Restructured, flattened, and simplified the internal interfaces for namespace object evaluation - resulting in smaller code, less CPU stack use, and fewer interfaces. (With assistance from Mikhail Kouzmich) Fixed a problem with the CopyObject operator where the first parameter was not typed correctly for the parser, interpreter, compiler, and disassembler. Caused various errors and unexpected behavior. Fixed a problem where a ShiftLeft or ShiftRight of more than 64 bits produced incorrect results with some C compilers. Since the behavior of C compilers when the shift value is larger than the datatype width is apparently not well defined, the interpreter now detects this condition and simply returns zero as expected in all such cases. (BZ 395) Fixed problem reports (Valery Podrezov) integrated: - Update String-to-Integer conversion to match ACPI 3.0A spec http://bugzilla.kernel.org/show_bug.cgi?id=5329 Allow interpreter to handle nested method declarations http://bugzilla.kernel.org/show_bug.cgi?id=5361 Fixed problem reports (Fiodor Suietov) integrated: - acpi_terminate() doesn't free debug memory allocation list objects (BZ 355) - After Core Subsystem shutdown, acpi_subsystem_status() returns AE_OK (BZ 356) - acpi_os_unmap_memory() for RSDP can be invoked inconsistently (BZ 357) - Resource Manager should return AE_TYPE for non-device objects (BZ 358) - Incomplete cleanup branch in AcpiNsEvaluateRelative (BZ 359) - Use acpi_os_free() instead of ACPI_FREE in acpi_rs_set_srs_method_data (BZ 360) - Incomplete cleanup branch in acpi_ps_parse_aml (BZ 361) - Incomplete cleanup branch in acpi_ds_delete_walk_state (BZ 362) - acpi_get_table_header returns AE_NO_ACPI_TABLES until DSDT is loaded (BZ 365) - Status of the Global Initialization Handler call not used (BZ 366) - Incorrect object parameter to Global Initialization Handler (BZ 367) Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/parser')
-rw-r--r--drivers/acpi/parser/psparse.c1
-rw-r--r--drivers/acpi/parser/psxface.c37
2 files changed, 20 insertions, 18 deletions
diff --git a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c
index 796f6b719929..7ee2f2e77525 100644
--- a/drivers/acpi/parser/psparse.c
+++ b/drivers/acpi/parser/psparse.c
@@ -464,6 +464,7 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
464 464
465 thread = acpi_ut_create_thread_state(); 465 thread = acpi_ut_create_thread_state();
466 if (!thread) { 466 if (!thread) {
467 acpi_ds_delete_walk_state(walk_state);
467 return_ACPI_STATUS(AE_NO_MEMORY); 468 return_ACPI_STATUS(AE_NO_MEMORY);
468 } 469 }
469 470
diff --git a/drivers/acpi/parser/psxface.c b/drivers/acpi/parser/psxface.c
index 6b1411f1087d..5d996c1140af 100644
--- a/drivers/acpi/parser/psxface.c
+++ b/drivers/acpi/parser/psxface.c
@@ -50,14 +50,14 @@
50ACPI_MODULE_NAME("psxface") 50ACPI_MODULE_NAME("psxface")
51 51
52/* Local Prototypes */ 52/* Local Prototypes */
53static void acpi_ps_start_trace(struct acpi_parameter_info *info); 53static void acpi_ps_start_trace(struct acpi_evaluate_info *info);
54 54
55static void acpi_ps_stop_trace(struct acpi_parameter_info *info); 55static void acpi_ps_stop_trace(struct acpi_evaluate_info *info);
56 56
57static acpi_status acpi_ps_execute_pass(struct acpi_parameter_info *info); 57static acpi_status acpi_ps_execute_pass(struct acpi_evaluate_info *info);
58 58
59static void 59static void
60acpi_ps_update_parameter_list(struct acpi_parameter_info *info, u16 action); 60acpi_ps_update_parameter_list(struct acpi_evaluate_info *info, u16 action);
61 61
62/******************************************************************************* 62/*******************************************************************************
63 * 63 *
@@ -113,7 +113,7 @@ acpi_debug_trace(char *name, u32 debug_level, u32 debug_layer, u32 flags)
113 * 113 *
114 ******************************************************************************/ 114 ******************************************************************************/
115 115
116static void acpi_ps_start_trace(struct acpi_parameter_info *info) 116static void acpi_ps_start_trace(struct acpi_evaluate_info *info)
117{ 117{
118 acpi_status status; 118 acpi_status status;
119 119
@@ -125,7 +125,7 @@ static void acpi_ps_start_trace(struct acpi_parameter_info *info)
125 } 125 }
126 126
127 if ((!acpi_gbl_trace_method_name) || 127 if ((!acpi_gbl_trace_method_name) ||
128 (acpi_gbl_trace_method_name != info->node->name.integer)) { 128 (acpi_gbl_trace_method_name != info->resolved_node->name.integer)) {
129 goto exit; 129 goto exit;
130 } 130 }
131 131
@@ -158,7 +158,7 @@ static void acpi_ps_start_trace(struct acpi_parameter_info *info)
158 * 158 *
159 ******************************************************************************/ 159 ******************************************************************************/
160 160
161static void acpi_ps_stop_trace(struct acpi_parameter_info *info) 161static void acpi_ps_stop_trace(struct acpi_evaluate_info *info)
162{ 162{
163 acpi_status status; 163 acpi_status status;
164 164
@@ -170,7 +170,7 @@ static void acpi_ps_stop_trace(struct acpi_parameter_info *info)
170 } 170 }
171 171
172 if ((!acpi_gbl_trace_method_name) || 172 if ((!acpi_gbl_trace_method_name) ||
173 (acpi_gbl_trace_method_name != info->node->name.integer)) { 173 (acpi_gbl_trace_method_name != info->resolved_node->name.integer)) {
174 goto exit; 174 goto exit;
175 } 175 }
176 176
@@ -212,7 +212,7 @@ static void acpi_ps_stop_trace(struct acpi_parameter_info *info)
212 * 212 *
213 ******************************************************************************/ 213 ******************************************************************************/
214 214
215acpi_status acpi_ps_execute_method(struct acpi_parameter_info *info) 215acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info)
216{ 216{
217 acpi_status status; 217 acpi_status status;
218 218
@@ -220,14 +220,15 @@ acpi_status acpi_ps_execute_method(struct acpi_parameter_info *info)
220 220
221 /* Validate the Info and method Node */ 221 /* Validate the Info and method Node */
222 222
223 if (!info || !info->node) { 223 if (!info || !info->resolved_node) {
224 return_ACPI_STATUS(AE_NULL_ENTRY); 224 return_ACPI_STATUS(AE_NULL_ENTRY);
225 } 225 }
226 226
227 /* Init for new method, wait on concurrency semaphore */ 227 /* Init for new method, wait on concurrency semaphore */
228 228
229 status = 229 status =
230 acpi_ds_begin_method_execution(info->node, info->obj_desc, NULL); 230 acpi_ds_begin_method_execution(info->resolved_node, info->obj_desc,
231 NULL);
231 if (ACPI_FAILURE(status)) { 232 if (ACPI_FAILURE(status)) {
232 return_ACPI_STATUS(status); 233 return_ACPI_STATUS(status);
233 } 234 }
@@ -248,7 +249,7 @@ acpi_status acpi_ps_execute_method(struct acpi_parameter_info *info)
248 */ 249 */
249 ACPI_DEBUG_PRINT((ACPI_DB_PARSE, 250 ACPI_DEBUG_PRINT((ACPI_DB_PARSE,
250 "**** Begin Method Parse **** Entry=%p obj=%p\n", 251 "**** Begin Method Parse **** Entry=%p obj=%p\n",
251 info->node, info->obj_desc)); 252 info->resolved_node, info->obj_desc));
252 253
253 info->pass_number = 1; 254 info->pass_number = 1;
254 status = acpi_ps_execute_pass(info); 255 status = acpi_ps_execute_pass(info);
@@ -261,7 +262,7 @@ acpi_status acpi_ps_execute_method(struct acpi_parameter_info *info)
261 */ 262 */
262 ACPI_DEBUG_PRINT((ACPI_DB_PARSE, 263 ACPI_DEBUG_PRINT((ACPI_DB_PARSE,
263 "**** Begin Method Execution **** Entry=%p obj=%p\n", 264 "**** Begin Method Execution **** Entry=%p obj=%p\n",
264 info->node, info->obj_desc)); 265 info->resolved_node, info->obj_desc));
265 266
266 info->pass_number = 3; 267 info->pass_number = 3;
267 status = acpi_ps_execute_pass(info); 268 status = acpi_ps_execute_pass(info);
@@ -300,7 +301,7 @@ acpi_status acpi_ps_execute_method(struct acpi_parameter_info *info)
300 * 301 *
301 * FUNCTION: acpi_ps_update_parameter_list 302 * FUNCTION: acpi_ps_update_parameter_list
302 * 303 *
303 * PARAMETERS: Info - See struct acpi_parameter_info 304 * PARAMETERS: Info - See struct acpi_evaluate_info
304 * (Used: parameter_type and Parameters) 305 * (Used: parameter_type and Parameters)
305 * Action - Add or Remove reference 306 * Action - Add or Remove reference
306 * 307 *
@@ -311,7 +312,7 @@ acpi_status acpi_ps_execute_method(struct acpi_parameter_info *info)
311 ******************************************************************************/ 312 ******************************************************************************/
312 313
313static void 314static void
314acpi_ps_update_parameter_list(struct acpi_parameter_info *info, u16 action) 315acpi_ps_update_parameter_list(struct acpi_evaluate_info *info, u16 action)
315{ 316{
316 acpi_native_uint i; 317 acpi_native_uint i;
317 318
@@ -334,7 +335,7 @@ acpi_ps_update_parameter_list(struct acpi_parameter_info *info, u16 action)
334 * 335 *
335 * FUNCTION: acpi_ps_execute_pass 336 * FUNCTION: acpi_ps_execute_pass
336 * 337 *
337 * PARAMETERS: Info - See struct acpi_parameter_info 338 * PARAMETERS: Info - See struct acpi_evaluate_info
338 * (Used: pass_number, Node, and obj_desc) 339 * (Used: pass_number, Node, and obj_desc)
339 * 340 *
340 * RETURN: Status 341 * RETURN: Status
@@ -343,7 +344,7 @@ acpi_ps_update_parameter_list(struct acpi_parameter_info *info, u16 action)
343 * 344 *
344 ******************************************************************************/ 345 ******************************************************************************/
345 346
346static acpi_status acpi_ps_execute_pass(struct acpi_parameter_info *info) 347static acpi_status acpi_ps_execute_pass(struct acpi_evaluate_info *info)
347{ 348{
348 acpi_status status; 349 acpi_status status;
349 union acpi_parse_object *op; 350 union acpi_parse_object *op;
@@ -368,7 +369,7 @@ static acpi_status acpi_ps_execute_pass(struct acpi_parameter_info *info)
368 goto cleanup; 369 goto cleanup;
369 } 370 }
370 371
371 status = acpi_ds_init_aml_walk(walk_state, op, info->node, 372 status = acpi_ds_init_aml_walk(walk_state, op, info->resolved_node,
372 info->obj_desc->method.aml_start, 373 info->obj_desc->method.aml_start,
373 info->obj_desc->method.aml_length, 374 info->obj_desc->method.aml_length,
374 info->pass_number == 1 ? NULL : info, 375 info->pass_number == 1 ? NULL : info,