diff options
author | Bob Moore <robert.moore@intel.com> | 2006-05-12 17:12:00 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-06-14 02:34:48 -0400 |
commit | 958dd242b691f64ab4632b4903dbb1e16fee8269 (patch) | |
tree | ddf4932fb4e3023dd0d1914571f17f2e3b03978d | |
parent | b229cf92eee616c7cb5ad8cdb35a19b119f00bc8 (diff) |
ACPI: ACPICA 20060512
Replaced the acpi_os_queue_for_execution() with a new
interface named acpi_os_execute(). The major difference is
that the new interface does not have a Priority parameter,
this appeared to be useless and has been replaced by
a Type parameter. The Type tells the OS what type of
execution is being requested, such as global lock handler,
notify handler, GPE handler, etc. This allows the host
to queue and execute the request as appropriate for the
request type, possibly using different work queues and
different priorities for the various request types. This
enables fixes for multithreading deadlock problems such as
http://bugzilla.kernel.org/show_bug.cgi?id=5534
(Alexey Starikovskiy and Bob Moore)
Fixed a possible memory leak associated with the
support for the so-called "implicit return" ACPI
extension. Reported by FreeBSD (Fiodor Suietov)
http://bugzilla.kernel.org/show_bug.cgi?id=6514
Fixed a problem with the Load() operator where a table
load from an operation region could overwrite an internal
table buffer by up to 7 bytes and cause alignment faults
on IPF systems. (With assistance from Luming Yu)
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
28 files changed, 161 insertions, 110 deletions
diff --git a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c index 651f2b68531b..e348db0e541e 100644 --- a/drivers/acpi/dispatcher/dsmethod.c +++ b/drivers/acpi/dispatcher/dsmethod.c | |||
@@ -385,6 +385,7 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state, | |||
385 | union acpi_operand_object *return_desc) | 385 | union acpi_operand_object *return_desc) |
386 | { | 386 | { |
387 | acpi_status status; | 387 | acpi_status status; |
388 | int same_as_implicit_return; | ||
388 | 389 | ||
389 | ACPI_FUNCTION_TRACE_PTR(ds_restart_control_method, walk_state); | 390 | ACPI_FUNCTION_TRACE_PTR(ds_restart_control_method, walk_state); |
390 | 391 | ||
@@ -402,6 +403,11 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state, | |||
402 | 403 | ||
403 | if (return_desc) { | 404 | if (return_desc) { |
404 | 405 | ||
406 | /* Is the implicit return object the same as the return desc? */ | ||
407 | |||
408 | same_as_implicit_return = | ||
409 | (walk_state->implicit_return_obj == return_desc); | ||
410 | |||
405 | /* Are we actually going to use the return value? */ | 411 | /* Are we actually going to use the return value? */ |
406 | 412 | ||
407 | if (walk_state->return_used) { | 413 | if (walk_state->return_used) { |
@@ -422,18 +428,23 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state, | |||
422 | } | 428 | } |
423 | 429 | ||
424 | /* | 430 | /* |
425 | * The following code is the | 431 | * The following code is the optional support for the so-called |
426 | * optional support for a so-called "implicit return". Some AML code | 432 | * "implicit return". Some AML code assumes that the last value of the |
427 | * assumes that the last value of the method is "implicitly" returned | 433 | * method is "implicitly" returned to the caller, in the absence of an |
428 | * to the caller. Just save the last result as the return value. | 434 | * explicit return value. |
435 | * | ||
436 | * Just save the last result of the method as the return value. | ||
437 | * | ||
429 | * NOTE: this is optional because the ASL language does not actually | 438 | * NOTE: this is optional because the ASL language does not actually |
430 | * support this behavior. | 439 | * support this behavior. |
431 | */ | 440 | */ |
432 | else if (!acpi_ds_do_implicit_return | 441 | else if (!acpi_ds_do_implicit_return |
433 | (return_desc, walk_state, FALSE)) { | 442 | (return_desc, walk_state, FALSE) |
443 | || same_as_implicit_return) { | ||
434 | /* | 444 | /* |
435 | * Delete the return value if it will not be used by the | 445 | * Delete the return value if it will not be used by the |
436 | * calling method | 446 | * calling method or remove one reference if the explicit return |
447 | * is the same as the implicit return value. | ||
437 | */ | 448 | */ |
438 | acpi_ut_remove_reference(return_desc); | 449 | acpi_ut_remove_reference(return_desc); |
439 | } | 450 | } |
diff --git a/drivers/acpi/dispatcher/dsmthdat.c b/drivers/acpi/dispatcher/dsmthdat.c index b47c54fad86d..459160ff9058 100644 --- a/drivers/acpi/dispatcher/dsmthdat.c +++ b/drivers/acpi/dispatcher/dsmthdat.c | |||
@@ -336,7 +336,7 @@ acpi_ds_method_data_set_value(u16 opcode, | |||
336 | * Increment ref count so object can't be deleted while installed. | 336 | * Increment ref count so object can't be deleted while installed. |
337 | * NOTE: We do not copy the object in order to preserve the call by | 337 | * NOTE: We do not copy the object in order to preserve the call by |
338 | * reference semantics of ACPI Control Method invocation. | 338 | * reference semantics of ACPI Control Method invocation. |
339 | * (See ACPI specification 2.0_c) | 339 | * (See ACPI Specification 2.0_c) |
340 | */ | 340 | */ |
341 | acpi_ut_add_reference(object); | 341 | acpi_ut_add_reference(object); |
342 | 342 | ||
@@ -351,7 +351,7 @@ acpi_ds_method_data_set_value(u16 opcode, | |||
351 | * FUNCTION: acpi_ds_method_data_get_value | 351 | * FUNCTION: acpi_ds_method_data_get_value |
352 | * | 352 | * |
353 | * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP | 353 | * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP |
354 | * Index - which local_var or argument to get | 354 | * Index - Which local_var or argument to get |
355 | * walk_state - Current walk state object | 355 | * walk_state - Current walk state object |
356 | * dest_desc - Where Arg or Local value is returned | 356 | * dest_desc - Where Arg or Local value is returned |
357 | * | 357 | * |
@@ -459,7 +459,7 @@ acpi_ds_method_data_get_value(u16 opcode, | |||
459 | * FUNCTION: acpi_ds_method_data_delete_value | 459 | * FUNCTION: acpi_ds_method_data_delete_value |
460 | * | 460 | * |
461 | * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP | 461 | * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP |
462 | * Index - which local_var or argument to delete | 462 | * Index - Which local_var or argument to delete |
463 | * walk_state - Current walk state object | 463 | * walk_state - Current walk state object |
464 | * | 464 | * |
465 | * RETURN: None | 465 | * RETURN: None |
diff --git a/drivers/acpi/dispatcher/dswload.c b/drivers/acpi/dispatcher/dswload.c index a8deb700cf33..35074399c617 100644 --- a/drivers/acpi/dispatcher/dswload.c +++ b/drivers/acpi/dispatcher/dswload.c | |||
@@ -178,12 +178,12 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state, | |||
178 | * Target of Scope() not found. Generate an External for it, and | 178 | * Target of Scope() not found. Generate an External for it, and |
179 | * insert the name into the namespace. | 179 | * insert the name into the namespace. |
180 | */ | 180 | */ |
181 | acpi_dm_add_to_external_list(path); | 181 | acpi_dm_add_to_external_list(path, ACPI_TYPE_DEVICE, 0); |
182 | status = | 182 | status = |
183 | acpi_ns_lookup(walk_state->scope_info, path, | 183 | acpi_ns_lookup(walk_state->scope_info, path, |
184 | object_type, ACPI_IMODE_LOAD_PASS1, | 184 | object_type, ACPI_IMODE_LOAD_PASS1, |
185 | ACPI_NS_SEARCH_PARENT, walk_state, | 185 | ACPI_NS_SEARCH_PARENT, walk_state, |
186 | &(node)); | 186 | &node); |
187 | } | 187 | } |
188 | #endif | 188 | #endif |
189 | if (ACPI_FAILURE(status)) { | 189 | if (ACPI_FAILURE(status)) { |
@@ -301,10 +301,41 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state, | |||
301 | status = | 301 | status = |
302 | acpi_ns_lookup(walk_state->scope_info, path, object_type, | 302 | acpi_ns_lookup(walk_state->scope_info, path, object_type, |
303 | ACPI_IMODE_LOAD_PASS1, flags, walk_state, | 303 | ACPI_IMODE_LOAD_PASS1, flags, walk_state, |
304 | &(node)); | 304 | &node); |
305 | if (ACPI_FAILURE(status)) { | 305 | if (ACPI_FAILURE(status)) { |
306 | ACPI_ERROR_NAMESPACE(path, status); | 306 | if (status == AE_ALREADY_EXISTS) { |
307 | return_ACPI_STATUS(status); | 307 | |
308 | /* The name already exists in this scope */ | ||
309 | |||
310 | if (node->flags & ANOBJ_IS_EXTERNAL) { | ||
311 | /* | ||
312 | * Allow one create on an object or segment that was | ||
313 | * previously declared External | ||
314 | */ | ||
315 | node->flags &= ~ANOBJ_IS_EXTERNAL; | ||
316 | node->type = (u8) object_type; | ||
317 | |||
318 | /* Just retyped a node, probably will need to open a scope */ | ||
319 | |||
320 | if (acpi_ns_opens_scope(object_type)) { | ||
321 | status = | ||
322 | acpi_ds_scope_stack_push | ||
323 | (node, object_type, | ||
324 | walk_state); | ||
325 | if (ACPI_FAILURE(status)) { | ||
326 | return_ACPI_STATUS | ||
327 | (status); | ||
328 | } | ||
329 | } | ||
330 | status = AE_OK; | ||
331 | } | ||
332 | } | ||
333 | |||
334 | if (ACPI_FAILURE(status)) { | ||
335 | |||
336 | ACPI_ERROR_NAMESPACE(path, status); | ||
337 | return_ACPI_STATUS(status); | ||
338 | } | ||
308 | } | 339 | } |
309 | break; | 340 | break; |
310 | } | 341 | } |
diff --git a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c index 25fd12a29a29..aa179dc78011 100644 --- a/drivers/acpi/events/evgpe.c +++ b/drivers/acpi/events/evgpe.c | |||
@@ -489,7 +489,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) | |||
489 | * RETURN: None | 489 | * RETURN: None |
490 | * | 490 | * |
491 | * DESCRIPTION: Perform the actual execution of a GPE control method. This | 491 | * DESCRIPTION: Perform the actual execution of a GPE control method. This |
492 | * function is called from an invocation of acpi_os_queue_for_execution | 492 | * function is called from an invocation of acpi_os_exece |
493 | * (and therefore does NOT execute at interrupt level) so that | 493 | * (and therefore does NOT execute at interrupt level) so that |
494 | * the control method itself is not executed in the context of | 494 | * the control method itself is not executed in the context of |
495 | * an interrupt handler. | 495 | * an interrupt handler. |
@@ -674,9 +674,9 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) | |||
674 | * Execute the method associated with the GPE | 674 | * Execute the method associated with the GPE |
675 | * NOTE: Level-triggered GPEs are cleared after the method completes. | 675 | * NOTE: Level-triggered GPEs are cleared after the method completes. |
676 | */ | 676 | */ |
677 | status = acpi_os_queue_for_execution(OSD_PRIORITY_GPE, | 677 | status = acpi_os_execute(OSL_GPE_HANDLER, |
678 | acpi_ev_asynch_execute_gpe_method, | 678 | acpi_ev_asynch_execute_gpe_method, |
679 | gpe_event_info); | 679 | gpe_event_info); |
680 | if (ACPI_FAILURE(status)) { | 680 | if (ACPI_FAILURE(status)) { |
681 | ACPI_EXCEPTION((AE_INFO, status, | 681 | ACPI_EXCEPTION((AE_INFO, status, |
682 | "Unable to queue handler for GPE[%2X] - event disabled", | 682 | "Unable to queue handler for GPE[%2X] - event disabled", |
diff --git a/drivers/acpi/events/evmisc.c b/drivers/acpi/events/evmisc.c index 97e05481aa7c..24e0b8d36f31 100644 --- a/drivers/acpi/events/evmisc.c +++ b/drivers/acpi/events/evmisc.c | |||
@@ -191,9 +191,8 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node, | |||
191 | notify_info->notify.value = (u16) notify_value; | 191 | notify_info->notify.value = (u16) notify_value; |
192 | notify_info->notify.handler_obj = handler_obj; | 192 | notify_info->notify.handler_obj = handler_obj; |
193 | 193 | ||
194 | status = acpi_os_queue_for_execution(OSD_PRIORITY_HIGH, | 194 | status = acpi_os_execute(OSL_NOTIFY_HANDLER, |
195 | acpi_ev_notify_dispatch, | 195 | acpi_ev_notify_dispatch, notify_info); |
196 | notify_info); | ||
197 | if (ACPI_FAILURE(status)) { | 196 | if (ACPI_FAILURE(status)) { |
198 | acpi_ut_delete_generic_state(notify_info); | 197 | acpi_ut_delete_generic_state(notify_info); |
199 | } | 198 | } |
@@ -346,9 +345,8 @@ static u32 acpi_ev_global_lock_handler(void *context) | |||
346 | 345 | ||
347 | /* Run the Global Lock thread which will signal all waiting threads */ | 346 | /* Run the Global Lock thread which will signal all waiting threads */ |
348 | 347 | ||
349 | status = acpi_os_queue_for_execution(OSD_PRIORITY_HIGH, | 348 | status = acpi_os_execute(OSL_GLOBAL_LOCK_HANDLER, |
350 | acpi_ev_global_lock_thread, | 349 | acpi_ev_global_lock_thread, context); |
351 | context); | ||
352 | if (ACPI_FAILURE(status)) { | 350 | if (ACPI_FAILURE(status)) { |
353 | ACPI_EXCEPTION((AE_INFO, status, | 351 | ACPI_EXCEPTION((AE_INFO, status, |
354 | "Could not queue Global Lock thread")); | 352 | "Could not queue Global Lock thread")); |
diff --git a/drivers/acpi/events/evregion.c b/drivers/acpi/events/evregion.c index eb29e96f053c..edf9d2e1dff9 100644 --- a/drivers/acpi/events/evregion.c +++ b/drivers/acpi/events/evregion.c | |||
@@ -261,7 +261,8 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function) | |||
261 | * Function - Read or Write operation | 261 | * Function - Read or Write operation |
262 | * Address - Where in the space to read or write | 262 | * Address - Where in the space to read or write |
263 | * bit_width - Field width in bits (8, 16, 32, or 64) | 263 | * bit_width - Field width in bits (8, 16, 32, or 64) |
264 | * Value - Pointer to in or out value | 264 | * Value - Pointer to in or out value, must be |
265 | * full 64-bit acpi_integer | ||
265 | * | 266 | * |
266 | * RETURN: Status | 267 | * RETURN: Status |
267 | * | 268 | * |
@@ -274,7 +275,7 @@ acpi_status | |||
274 | acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, | 275 | acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, |
275 | u32 function, | 276 | u32 function, |
276 | acpi_physical_address address, | 277 | acpi_physical_address address, |
277 | u32 bit_width, void *value) | 278 | u32 bit_width, acpi_integer * value) |
278 | { | 279 | { |
279 | acpi_status status; | 280 | acpi_status status; |
280 | acpi_status status2; | 281 | acpi_status status2; |
@@ -1007,7 +1008,7 @@ acpi_ev_execute_reg_methods(struct acpi_namespace_node *node, | |||
1007 | * | 1008 | * |
1008 | * PARAMETERS: walk_namespace callback | 1009 | * PARAMETERS: walk_namespace callback |
1009 | * | 1010 | * |
1010 | * DESCRIPTION: Run _REg method for region objects of the requested space_iD | 1011 | * DESCRIPTION: Run _REG method for region objects of the requested space_iD |
1011 | * | 1012 | * |
1012 | ******************************************************************************/ | 1013 | ******************************************************************************/ |
1013 | 1014 | ||
diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c index 9c46f3338640..9ae3cb55979b 100644 --- a/drivers/acpi/executer/exconfig.c +++ b/drivers/acpi/executer/exconfig.c | |||
@@ -298,6 +298,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, | |||
298 | struct acpi_table_header *table_ptr = NULL; | 298 | struct acpi_table_header *table_ptr = NULL; |
299 | acpi_physical_address address; | 299 | acpi_physical_address address; |
300 | struct acpi_table_header table_header; | 300 | struct acpi_table_header table_header; |
301 | acpi_integer temp; | ||
301 | u32 i; | 302 | u32 i; |
302 | 303 | ||
303 | ACPI_FUNCTION_TRACE(ex_load_op); | 304 | ACPI_FUNCTION_TRACE(ex_load_op); |
@@ -326,7 +327,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, | |||
326 | 327 | ||
327 | address = obj_desc->region.address; | 328 | address = obj_desc->region.address; |
328 | 329 | ||
329 | /* Get the table length from the table header */ | 330 | /* Get part of the table header to get the table length */ |
330 | 331 | ||
331 | table_header.length = 0; | 332 | table_header.length = 0; |
332 | for (i = 0; i < 8; i++) { | 333 | for (i = 0; i < 8; i++) { |
@@ -334,11 +335,14 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, | |||
334 | acpi_ev_address_space_dispatch(obj_desc, ACPI_READ, | 335 | acpi_ev_address_space_dispatch(obj_desc, ACPI_READ, |
335 | (acpi_physical_address) | 336 | (acpi_physical_address) |
336 | (i + address), 8, | 337 | (i + address), 8, |
337 | ((u8 *) & | 338 | &temp); |
338 | table_header) + i); | ||
339 | if (ACPI_FAILURE(status)) { | 339 | if (ACPI_FAILURE(status)) { |
340 | return_ACPI_STATUS(status); | 340 | return_ACPI_STATUS(status); |
341 | } | 341 | } |
342 | |||
343 | /* Get the one valid byte of the returned 64-bit value */ | ||
344 | |||
345 | ACPI_CAST_PTR(u8, &table_header)[i] = (u8) temp; | ||
342 | } | 346 | } |
343 | 347 | ||
344 | /* Sanity check the table length */ | 348 | /* Sanity check the table length */ |
@@ -361,11 +365,14 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, | |||
361 | acpi_ev_address_space_dispatch(obj_desc, ACPI_READ, | 365 | acpi_ev_address_space_dispatch(obj_desc, ACPI_READ, |
362 | (acpi_physical_address) | 366 | (acpi_physical_address) |
363 | (i + address), 8, | 367 | (i + address), 8, |
364 | ((u8 *) table_ptr + | 368 | &temp); |
365 | i)); | ||
366 | if (ACPI_FAILURE(status)) { | 369 | if (ACPI_FAILURE(status)) { |
367 | goto cleanup; | 370 | goto cleanup; |
368 | } | 371 | } |
372 | |||
373 | /* Get the one valid byte of the returned 64-bit value */ | ||
374 | |||
375 | ACPI_CAST_PTR(u8, table_ptr)[i] = (u8) temp; | ||
369 | } | 376 | } |
370 | break; | 377 | break; |
371 | 378 | ||
diff --git a/drivers/acpi/executer/exstorob.c b/drivers/acpi/executer/exstorob.c index 18925f5b313c..99ebe5adfcda 100644 --- a/drivers/acpi/executer/exstorob.c +++ b/drivers/acpi/executer/exstorob.c | |||
@@ -103,7 +103,7 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc, | |||
103 | * NOTE: ACPI versions up to 3.0 specified that the buffer must be | 103 | * NOTE: ACPI versions up to 3.0 specified that the buffer must be |
104 | * truncated if the string is smaller than the buffer. However, "other" | 104 | * truncated if the string is smaller than the buffer. However, "other" |
105 | * implementations of ACPI never did this and thus became the defacto | 105 | * implementations of ACPI never did this and thus became the defacto |
106 | * standard. ACPi 3.0_a changes this behavior such that the buffer | 106 | * standard. ACPI 3.0_a changes this behavior such that the buffer |
107 | * is no longer truncated. | 107 | * is no longer truncated. |
108 | */ | 108 | */ |
109 | 109 | ||
diff --git a/drivers/acpi/namespace/nsaccess.c b/drivers/acpi/namespace/nsaccess.c index 5e3f63a90fb4..ba8ad569188f 100644 --- a/drivers/acpi/namespace/nsaccess.c +++ b/drivers/acpi/namespace/nsaccess.c | |||
@@ -157,7 +157,7 @@ acpi_status acpi_ns_root_initialize(void) | |||
157 | 157 | ||
158 | #if defined (ACPI_ASL_COMPILER) | 158 | #if defined (ACPI_ASL_COMPILER) |
159 | 159 | ||
160 | /* save the parameter count for the i_aSL compiler */ | 160 | /* Save the parameter count for the i_aSL compiler */ |
161 | 161 | ||
162 | new_node->value = obj_desc->method.param_count; | 162 | new_node->value = obj_desc->method.param_count; |
163 | #else | 163 | #else |
@@ -311,8 +311,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, | |||
311 | acpi_object_type type_to_check_for; | 311 | acpi_object_type type_to_check_for; |
312 | acpi_object_type this_search_type; | 312 | acpi_object_type this_search_type; |
313 | u32 search_parent_flag = ACPI_NS_SEARCH_PARENT; | 313 | u32 search_parent_flag = ACPI_NS_SEARCH_PARENT; |
314 | u32 local_flags = flags & ~(ACPI_NS_ERROR_IF_FOUND | | 314 | u32 local_flags; |
315 | ACPI_NS_SEARCH_PARENT); | ||
316 | 315 | ||
317 | ACPI_FUNCTION_TRACE(ns_lookup); | 316 | ACPI_FUNCTION_TRACE(ns_lookup); |
318 | 317 | ||
@@ -320,8 +319,9 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, | |||
320 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 319 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
321 | } | 320 | } |
322 | 321 | ||
323 | acpi_gbl_ns_lookup_count++; | 322 | local_flags = flags & ~(ACPI_NS_ERROR_IF_FOUND | ACPI_NS_SEARCH_PARENT); |
324 | *return_node = ACPI_ENTRY_NOT_FOUND; | 323 | *return_node = ACPI_ENTRY_NOT_FOUND; |
324 | acpi_gbl_ns_lookup_count++; | ||
325 | 325 | ||
326 | if (!acpi_gbl_root_node) { | 326 | if (!acpi_gbl_root_node) { |
327 | return_ACPI_STATUS(AE_NO_NAMESPACE); | 327 | return_ACPI_STATUS(AE_NO_NAMESPACE); |
diff --git a/drivers/acpi/namespace/nssearch.c b/drivers/acpi/namespace/nssearch.c index 34ac512a2d5e..d2473476afa5 100644 --- a/drivers/acpi/namespace/nssearch.c +++ b/drivers/acpi/namespace/nssearch.c | |||
@@ -299,7 +299,7 @@ acpi_ns_search_and_enter(u32 target_name, | |||
299 | 299 | ||
300 | if (!node || !target_name || !return_node) { | 300 | if (!node || !target_name || !return_node) { |
301 | ACPI_ERROR((AE_INFO, | 301 | ACPI_ERROR((AE_INFO, |
302 | "Null param: Node %p Name %X ReturnNode %p", | 302 | "Null parameter: Node %p Name %X ReturnNode %p", |
303 | node, target_name, return_node)); | 303 | node, target_name, return_node)); |
304 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 304 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
305 | } | 305 | } |
@@ -385,6 +385,11 @@ acpi_ns_search_and_enter(u32 target_name, | |||
385 | if (!new_node) { | 385 | if (!new_node) { |
386 | return_ACPI_STATUS(AE_NO_MEMORY); | 386 | return_ACPI_STATUS(AE_NO_MEMORY); |
387 | } | 387 | } |
388 | #ifdef ACPI_ASL_COMPILER | ||
389 | if (flags & ACPI_NS_EXTERNAL) { | ||
390 | new_node->flags |= ANOBJ_IS_EXTERNAL; | ||
391 | } | ||
392 | #endif | ||
388 | 393 | ||
389 | /* Install the new object into the parent's list of children */ | 394 | /* Install the new object into the parent's list of children */ |
390 | 395 | ||
diff --git a/drivers/acpi/resources/rscalc.c b/drivers/acpi/resources/rscalc.c index a573ad5d41db..cf87b0230026 100644 --- a/drivers/acpi/resources/rscalc.c +++ b/drivers/acpi/resources/rscalc.c | |||
@@ -451,7 +451,7 @@ acpi_rs_get_list_length(u8 * aml_buffer, | |||
451 | */ | 451 | */ |
452 | buffer_size = acpi_gbl_resource_struct_sizes[resource_index] + | 452 | buffer_size = acpi_gbl_resource_struct_sizes[resource_index] + |
453 | extra_struct_bytes; | 453 | extra_struct_bytes; |
454 | buffer_size = ACPI_ROUND_UP_TO_NATIVE_WORD(buffer_size); | 454 | buffer_size = (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(buffer_size); |
455 | 455 | ||
456 | *size_needed += buffer_size; | 456 | *size_needed += buffer_size; |
457 | 457 | ||
@@ -579,7 +579,7 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object, | |||
579 | 579 | ||
580 | /* Round up the size since each element must be aligned */ | 580 | /* Round up the size since each element must be aligned */ |
581 | 581 | ||
582 | temp_size_needed = ACPI_ROUND_UP_to_64_bIT(temp_size_needed); | 582 | temp_size_needed = ACPI_ROUND_UP_TO_64BIT(temp_size_needed); |
583 | 583 | ||
584 | /* Point to the next union acpi_operand_object */ | 584 | /* Point to the next union acpi_operand_object */ |
585 | 585 | ||
diff --git a/drivers/acpi/resources/rscreate.c b/drivers/acpi/resources/rscreate.c index 4c322daaf885..008058acdd39 100644 --- a/drivers/acpi/resources/rscreate.c +++ b/drivers/acpi/resources/rscreate.c | |||
@@ -335,7 +335,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, | |||
335 | /* Now align the current length */ | 335 | /* Now align the current length */ |
336 | 336 | ||
337 | user_prt->length = | 337 | user_prt->length = |
338 | (u32) ACPI_ROUND_UP_to_64_bIT(user_prt->length); | 338 | (u32) ACPI_ROUND_UP_TO_64BIT(user_prt->length); |
339 | 339 | ||
340 | /* 4) Fourth subobject: Dereference the PRT.source_index */ | 340 | /* 4) Fourth subobject: Dereference the PRT.source_index */ |
341 | 341 | ||
diff --git a/drivers/acpi/resources/rsutils.c b/drivers/acpi/resources/rsutils.c index aa98eebc9b78..0e493f2fec4d 100644 --- a/drivers/acpi/resources/rsutils.c +++ b/drivers/acpi/resources/rsutils.c | |||
@@ -354,6 +354,7 @@ acpi_rs_get_resource_source(acpi_rs_length resource_length, | |||
354 | * Zero the entire area of the buffer. | 354 | * Zero the entire area of the buffer. |
355 | */ | 355 | */ |
356 | total_length = | 356 | total_length = |
357 | (u32) | ||
357 | ACPI_STRLEN(ACPI_CAST_PTR(char, &aml_resource_source[1])) + | 358 | ACPI_STRLEN(ACPI_CAST_PTR(char, &aml_resource_source[1])) + |
358 | 1; | 359 | 1; |
359 | total_length = (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(total_length); | 360 | total_length = (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(total_length); |
@@ -528,7 +529,7 @@ acpi_rs_get_crs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer) | |||
528 | */ | 529 | */ |
529 | status = acpi_rs_create_resource_list(obj_desc, ret_buffer); | 530 | status = acpi_rs_create_resource_list(obj_desc, ret_buffer); |
530 | 531 | ||
531 | /* on exit, we must delete the object returned by evaluate_object */ | 532 | /* On exit, we must delete the object returned by evaluate_object */ |
532 | 533 | ||
533 | acpi_ut_remove_reference(obj_desc); | 534 | acpi_ut_remove_reference(obj_desc); |
534 | return_ACPI_STATUS(status); | 535 | return_ACPI_STATUS(status); |
@@ -578,7 +579,7 @@ acpi_rs_get_prs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer) | |||
578 | */ | 579 | */ |
579 | status = acpi_rs_create_resource_list(obj_desc, ret_buffer); | 580 | status = acpi_rs_create_resource_list(obj_desc, ret_buffer); |
580 | 581 | ||
581 | /* on exit, we must delete the object returned by evaluate_object */ | 582 | /* On exit, we must delete the object returned by evaluate_object */ |
582 | 583 | ||
583 | acpi_ut_remove_reference(obj_desc); | 584 | acpi_ut_remove_reference(obj_desc); |
584 | return_ACPI_STATUS(status); | 585 | return_ACPI_STATUS(status); |
diff --git a/drivers/acpi/tables/tbrsdt.c b/drivers/acpi/tables/tbrsdt.c index 9e226438a3f6..494965229fa2 100644 --- a/drivers/acpi/tables/tbrsdt.c +++ b/drivers/acpi/tables/tbrsdt.c | |||
@@ -196,10 +196,8 @@ acpi_status acpi_tb_validate_rsdt(struct acpi_table_header *table_ptr) | |||
196 | ACPI_DUMP_BUFFER(acpi_gbl_RSDP, 20); | 196 | ACPI_DUMP_BUFFER(acpi_gbl_RSDP, 20); |
197 | 197 | ||
198 | ACPI_ERROR((AE_INFO, | 198 | ACPI_ERROR((AE_INFO, |
199 | "RSDT/XSDT signature at %X (%p) is invalid", | 199 | "RSDT/XSDT signature at %X is invalid", |
200 | acpi_gbl_RSDP->rsdt_physical_address, | 200 | acpi_gbl_RSDP->rsdt_physical_address)); |
201 | (void *)(acpi_native_uint) acpi_gbl_RSDP-> | ||
202 | rsdt_physical_address)); | ||
203 | 201 | ||
204 | if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) { | 202 | if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) { |
205 | ACPI_ERROR((AE_INFO, "Looking for RSDT")); | 203 | ACPI_ERROR((AE_INFO, "Looking for RSDT")); |
diff --git a/drivers/acpi/tables/tbxfroot.c b/drivers/acpi/tables/tbxfroot.c index 3107e741d510..da2648bbdbc0 100644 --- a/drivers/acpi/tables/tbxfroot.c +++ b/drivers/acpi/tables/tbxfroot.c | |||
@@ -472,10 +472,10 @@ static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length) | |||
472 | * | 472 | * |
473 | * RETURN: Status, RSDP physical address | 473 | * RETURN: Status, RSDP physical address |
474 | * | 474 | * |
475 | * DESCRIPTION: search lower 1_mbyte of memory for the root system descriptor | 475 | * DESCRIPTION: Search lower 1_mbyte of memory for the root system descriptor |
476 | * pointer structure. If it is found, set *RSDP to point to it. | 476 | * pointer structure. If it is found, set *RSDP to point to it. |
477 | * | 477 | * |
478 | * NOTE1: The RSDp must be either in the first 1_k of the Extended | 478 | * NOTE1: The RSDP must be either in the first 1_k of the Extended |
479 | * BIOS Data Area or between E0000 and FFFFF (From ACPI Spec.) | 479 | * BIOS Data Area or between E0000 and FFFFF (From ACPI Spec.) |
480 | * Only a 32-bit physical address is necessary. | 480 | * Only a 32-bit physical address is necessary. |
481 | * | 481 | * |
@@ -525,7 +525,7 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags) | |||
525 | 525 | ||
526 | if (physical_address > 0x400) { | 526 | if (physical_address > 0x400) { |
527 | /* | 527 | /* |
528 | * 1b) Search EBDA paragraphs (EBDa is required to be a | 528 | * 1b) Search EBDA paragraphs (EBDA is required to be a |
529 | * minimum of 1_k length) | 529 | * minimum of 1_k length) |
530 | */ | 530 | */ |
531 | status = acpi_os_map_memory((acpi_physical_address) | 531 | status = acpi_os_map_memory((acpi_physical_address) |
@@ -550,7 +550,7 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags) | |||
550 | /* Return the physical address */ | 550 | /* Return the physical address */ |
551 | 551 | ||
552 | physical_address += | 552 | physical_address += |
553 | ACPI_PTR_DIFF(mem_rover, table_ptr); | 553 | (u32) ACPI_PTR_DIFF(mem_rover, table_ptr); |
554 | 554 | ||
555 | table_info->physical_address = | 555 | table_info->physical_address = |
556 | (acpi_physical_address) physical_address; | 556 | (acpi_physical_address) physical_address; |
@@ -584,9 +584,9 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags) | |||
584 | 584 | ||
585 | /* Return the physical address */ | 585 | /* Return the physical address */ |
586 | 586 | ||
587 | physical_address = | 587 | physical_address = (u32) |
588 | ACPI_HI_RSDP_WINDOW_BASE + ACPI_PTR_DIFF(mem_rover, | 588 | (ACPI_HI_RSDP_WINDOW_BASE + |
589 | table_ptr); | 589 | ACPI_PTR_DIFF(mem_rover, table_ptr)); |
590 | 590 | ||
591 | table_info->physical_address = | 591 | table_info->physical_address = |
592 | (acpi_physical_address) physical_address; | 592 | (acpi_physical_address) physical_address; |
@@ -607,7 +607,7 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags) | |||
607 | 607 | ||
608 | if (physical_address > 0x400) { | 608 | if (physical_address > 0x400) { |
609 | /* | 609 | /* |
610 | * 1b) Search EBDA paragraphs (EBDa is required to be a minimum of | 610 | * 1b) Search EBDA paragraphs (EBDA is required to be a minimum of |
611 | * 1_k length) | 611 | * 1_k length) |
612 | */ | 612 | */ |
613 | mem_rover = | 613 | mem_rover = |
diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c index e666c71be0bf..9450f9b5bfb2 100644 --- a/drivers/acpi/utilities/utglobal.c +++ b/drivers/acpi/utilities/utglobal.c | |||
@@ -443,7 +443,6 @@ struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] = | |||
443 | /* Region type decoding */ | 443 | /* Region type decoding */ |
444 | 444 | ||
445 | const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = { | 445 | const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = { |
446 | /*! [Begin] no source code translation (keep these ASL Keywords as-is) */ | ||
447 | "SystemMemory", | 446 | "SystemMemory", |
448 | "SystemIO", | 447 | "SystemIO", |
449 | "PCI_Config", | 448 | "PCI_Config", |
@@ -452,7 +451,6 @@ const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = { | |||
452 | "CMOS", | 451 | "CMOS", |
453 | "PCIBARTarget", | 452 | "PCIBARTarget", |
454 | "DataTable" | 453 | "DataTable" |
455 | /*! [End] no source code translation !*/ | ||
456 | }; | 454 | }; |
457 | 455 | ||
458 | char *acpi_ut_get_region_name(u8 space_id) | 456 | char *acpi_ut_get_region_name(u8 space_id) |
@@ -482,13 +480,11 @@ char *acpi_ut_get_region_name(u8 space_id) | |||
482 | /* Event type decoding */ | 480 | /* Event type decoding */ |
483 | 481 | ||
484 | static const char *acpi_gbl_event_types[ACPI_NUM_FIXED_EVENTS] = { | 482 | static const char *acpi_gbl_event_types[ACPI_NUM_FIXED_EVENTS] = { |
485 | /*! [Begin] no source code translation (keep these strings as-is) */ | ||
486 | "PM_Timer", | 483 | "PM_Timer", |
487 | "GlobalLock", | 484 | "GlobalLock", |
488 | "PowerButton", | 485 | "PowerButton", |
489 | "SleepButton", | 486 | "SleepButton", |
490 | "RealTimeClock", | 487 | "RealTimeClock", |
491 | /*! [End] no source code translation !*/ | ||
492 | }; | 488 | }; |
493 | 489 | ||
494 | char *acpi_ut_get_event_name(u32 event_id) | 490 | char *acpi_ut_get_event_name(u32 event_id) |
@@ -526,7 +522,6 @@ static const char acpi_gbl_bad_type[] = "UNDEFINED"; | |||
526 | /* Printable names of the ACPI object types */ | 522 | /* Printable names of the ACPI object types */ |
527 | 523 | ||
528 | static const char *acpi_gbl_ns_type_names[] = { | 524 | static const char *acpi_gbl_ns_type_names[] = { |
529 | /*! [Begin] no source code translation (keep these strings as-is) */ | ||
530 | /* 00 */ "Untyped", | 525 | /* 00 */ "Untyped", |
531 | /* 01 */ "Integer", | 526 | /* 01 */ "Integer", |
532 | /* 02 */ "String", | 527 | /* 02 */ "String", |
@@ -558,7 +553,6 @@ static const char *acpi_gbl_ns_type_names[] = { | |||
558 | /* 28 */ "Extra", | 553 | /* 28 */ "Extra", |
559 | /* 29 */ "Data", | 554 | /* 29 */ "Data", |
560 | /* 30 */ "Invalid" | 555 | /* 30 */ "Invalid" |
561 | /*! [End] no source code translation !*/ | ||
562 | }; | 556 | }; |
563 | 557 | ||
564 | char *acpi_ut_get_type_name(acpi_object_type type) | 558 | char *acpi_ut_get_type_name(acpi_object_type type) |
@@ -641,7 +635,6 @@ char *acpi_ut_get_node_name(void *object) | |||
641 | /* Printable names of object descriptor types */ | 635 | /* Printable names of object descriptor types */ |
642 | 636 | ||
643 | static const char *acpi_gbl_desc_type_names[] = { | 637 | static const char *acpi_gbl_desc_type_names[] = { |
644 | /*! [Begin] no source code translation (keep these ASL Keywords as-is) */ | ||
645 | /* 00 */ "Invalid", | 638 | /* 00 */ "Invalid", |
646 | /* 01 */ "Cached", | 639 | /* 01 */ "Cached", |
647 | /* 02 */ "State-Generic", | 640 | /* 02 */ "State-Generic", |
@@ -658,7 +651,6 @@ static const char *acpi_gbl_desc_type_names[] = { | |||
658 | /* 13 */ "Parser", | 651 | /* 13 */ "Parser", |
659 | /* 14 */ "Operand", | 652 | /* 14 */ "Operand", |
660 | /* 15 */ "Node" | 653 | /* 15 */ "Node" |
661 | /*! [End] no source code translation !*/ | ||
662 | }; | 654 | }; |
663 | 655 | ||
664 | char *acpi_ut_get_descriptor_name(void *object) | 656 | char *acpi_ut_get_descriptor_name(void *object) |
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 11e72e6cdc01..0177ed3dc807 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h | |||
@@ -63,7 +63,7 @@ | |||
63 | 63 | ||
64 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 64 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
65 | 65 | ||
66 | #define ACPI_CA_VERSION 0x20060421 | 66 | #define ACPI_CA_VERSION 0x20060512 |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * OS name, used for the _OS object. The _OS object is essentially obsolete, | 69 | * OS name, used for the _OS object. The _OS object is essentially obsolete, |
diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h index 6f2556582f05..9a7d6921f534 100644 --- a/include/acpi/acdisasm.h +++ b/include/acpi/acdisasm.h | |||
@@ -54,7 +54,11 @@ | |||
54 | 54 | ||
55 | struct acpi_external_list { | 55 | struct acpi_external_list { |
56 | char *path; | 56 | char *path; |
57 | char *internal_path; | ||
57 | struct acpi_external_list *next; | 58 | struct acpi_external_list *next; |
59 | u32 value; | ||
60 | u16 length; | ||
61 | u8 type; | ||
58 | }; | 62 | }; |
59 | 63 | ||
60 | extern struct acpi_external_list *acpi_gbl_external_list; | 64 | extern struct acpi_external_list *acpi_gbl_external_list; |
@@ -108,6 +112,8 @@ struct acpi_dmtable_data { | |||
108 | 112 | ||
109 | struct acpi_op_walk_info { | 113 | struct acpi_op_walk_info { |
110 | u32 level; | 114 | u32 level; |
115 | u32 last_level; | ||
116 | u32 count; | ||
111 | u32 bit_offset; | 117 | u32 bit_offset; |
112 | u32 flags; | 118 | u32 flags; |
113 | struct acpi_walk_state *walk_state; | 119 | struct acpi_walk_state *walk_state; |
@@ -390,7 +396,7 @@ acpi_dm_vendor_small_descriptor(union aml_resource *resource, | |||
390 | /* | 396 | /* |
391 | * dmutils | 397 | * dmutils |
392 | */ | 398 | */ |
393 | void acpi_dm_add_to_external_list(char *path); | 399 | void acpi_dm_add_to_external_list(char *path, u8 type, u32 value); |
394 | 400 | ||
395 | /* | 401 | /* |
396 | * dmrestag | 402 | * dmrestag |
diff --git a/include/acpi/acevents.h b/include/acpi/acevents.h index 272bd0480ec7..234142828e1a 100644 --- a/include/acpi/acevents.h +++ b/include/acpi/acevents.h | |||
@@ -138,7 +138,7 @@ acpi_status | |||
138 | acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, | 138 | acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, |
139 | u32 function, | 139 | u32 function, |
140 | acpi_physical_address address, | 140 | acpi_physical_address address, |
141 | u32 bit_width, void *value); | 141 | u32 bit_width, acpi_integer * value); |
142 | 142 | ||
143 | acpi_status | 143 | acpi_status |
144 | acpi_ev_attach_region(union acpi_operand_object *handler_obj, | 144 | acpi_ev_attach_region(union acpi_operand_object *handler_obj, |
diff --git a/include/acpi/acglobal.h b/include/acpi/acglobal.h index 5f2daf402ee1..9297f293b2c0 100644 --- a/include/acpi/acglobal.h +++ b/include/acpi/acglobal.h | |||
@@ -292,14 +292,6 @@ ACPI_EXTERN u8 acpi_gbl_cm_single_step; | |||
292 | 292 | ||
293 | /***************************************************************************** | 293 | /***************************************************************************** |
294 | * | 294 | * |
295 | * Parser globals | ||
296 | * | ||
297 | ****************************************************************************/ | ||
298 | |||
299 | ACPI_EXTERN union acpi_parse_object *acpi_gbl_parsed_namespace_root; | ||
300 | |||
301 | /***************************************************************************** | ||
302 | * | ||
303 | * Hardware globals | 295 | * Hardware globals |
304 | * | 296 | * |
305 | ****************************************************************************/ | 297 | ****************************************************************************/ |
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h index 06a9bd0a9ce9..98c697e3c486 100644 --- a/include/acpi/aclocal.h +++ b/include/acpi/aclocal.h | |||
@@ -207,10 +207,11 @@ struct acpi_namespace_node { | |||
207 | #define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */ | 207 | #define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */ |
208 | #define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */ | 208 | #define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */ |
209 | 209 | ||
210 | #define ANOBJ_METHOD_NO_RETVal 0x10 /* i_aSL only: Method has no return value */ | 210 | #define ANOBJ_IS_EXTERNAL 0x08 /* i_aSL only: This object created via External() */ |
211 | #define ANOBJ_METHOD_SOME_NO_RETVal 0x20 /* i_aSL only: Method has at least one return value */ | 211 | #define ANOBJ_METHOD_NO_RETVAL 0x10 /* i_aSL only: Method has no return value */ |
212 | #define ANOBJ_IS_BIT_OFFSet 0x40 /* i_aSL only: Reference is a bit offset */ | 212 | #define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* i_aSL only: Method has at least one return value */ |
213 | #define ANOBJ_IS_REFERENCed 0x80 /* i_aSL only: Object was referenced */ | 213 | #define ANOBJ_IS_BIT_OFFSET 0x40 /* i_aSL only: Reference is a bit offset */ |
214 | #define ANOBJ_IS_REFERENCED 0x80 /* i_aSL only: Object was referenced */ | ||
214 | 215 | ||
215 | /* | 216 | /* |
216 | * ACPI Table Descriptor. One per ACPI table | 217 | * ACPI Table Descriptor. One per ACPI table |
@@ -595,6 +596,9 @@ union acpi_parse_value { | |||
595 | #define ACPI_DASM_UNICODE 0x03 | 596 | #define ACPI_DASM_UNICODE 0x03 |
596 | #define ACPI_DASM_EISAID 0x04 | 597 | #define ACPI_DASM_EISAID 0x04 |
597 | #define ACPI_DASM_MATCHOP 0x05 | 598 | #define ACPI_DASM_MATCHOP 0x05 |
599 | #define ACPI_DASM_LNOT_PREFIX 0x06 | ||
600 | #define ACPI_DASM_LNOT_SUFFIX 0x07 | ||
601 | #define ACPI_DASM_IGNORE 0x08 | ||
598 | 602 | ||
599 | /* | 603 | /* |
600 | * Generic operation (for example: If, While, Store) | 604 | * Generic operation (for example: If, While, Store) |
@@ -613,7 +617,7 @@ struct acpi_parse_obj_named { | |||
613 | u32 name; /* 4-byte name or zero if no name */ | 617 | u32 name; /* 4-byte name or zero if no name */ |
614 | }; | 618 | }; |
615 | 619 | ||
616 | /* this version is used by the i_aSL compiler only */ | 620 | /* This version is used by the i_aSL compiler only */ |
617 | 621 | ||
618 | #define ACPI_MAX_PARSEOP_NAME 20 | 622 | #define ACPI_MAX_PARSEOP_NAME 20 |
619 | 623 | ||
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h index b7547aba91b9..38f9aa4bef00 100644 --- a/include/acpi/acmacros.h +++ b/include/acpi/acmacros.h | |||
@@ -103,7 +103,7 @@ | |||
103 | * printf() format helpers | 103 | * printf() format helpers |
104 | */ | 104 | */ |
105 | 105 | ||
106 | /* Split 64-bit integer into two 32-bit values. Use with %8.8X%8.8X */ | 106 | /* Split 64-bit integer into two 32-bit values. Use with %8.8_x%8.8_x */ |
107 | 107 | ||
108 | #define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i),ACPI_LODWORD(i) | 108 | #define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i),ACPI_LODWORD(i) |
109 | 109 | ||
@@ -359,12 +359,12 @@ | |||
359 | 359 | ||
360 | /* Note: sizeof(acpi_native_uint) evaluates to either 2, 4, or 8 */ | 360 | /* Note: sizeof(acpi_native_uint) evaluates to either 2, 4, or 8 */ |
361 | 361 | ||
362 | #define ACPI_ROUND_DOWN_to_32_bIT(a) ACPI_ROUND_DOWN(a,4) | 362 | #define ACPI_ROUND_DOWN_TO_32BIT(a) ACPI_ROUND_DOWN(a,4) |
363 | #define ACPI_ROUND_DOWN_to_64_bIT(a) ACPI_ROUND_DOWN(a,8) | 363 | #define ACPI_ROUND_DOWN_TO_64BIT(a) ACPI_ROUND_DOWN(a,8) |
364 | #define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a,sizeof(acpi_native_uint)) | 364 | #define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a,sizeof(acpi_native_uint)) |
365 | 365 | ||
366 | #define ACPI_ROUND_UP_to_32_bIT(a) ACPI_ROUND_UP(a,4) | 366 | #define ACPI_ROUND_UP_TO_32BIT(a) ACPI_ROUND_UP(a,4) |
367 | #define ACPI_ROUND_UP_to_64_bIT(a) ACPI_ROUND_UP(a,8) | 367 | #define ACPI_ROUND_UP_TO_64BIT(a) ACPI_ROUND_UP(a,8) |
368 | #define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,sizeof(acpi_native_uint)) | 368 | #define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,sizeof(acpi_native_uint)) |
369 | 369 | ||
370 | #define ACPI_ROUND_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7) | 370 | #define ACPI_ROUND_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7) |
diff --git a/include/acpi/acnamesp.h b/include/acpi/acnamesp.h index 132d64af24fe..2ef8540c0fba 100644 --- a/include/acpi/acnamesp.h +++ b/include/acpi/acnamesp.h | |||
@@ -64,6 +64,7 @@ | |||
64 | #define ACPI_NS_NO_PEER_SEARCH 0x04 | 64 | #define ACPI_NS_NO_PEER_SEARCH 0x04 |
65 | #define ACPI_NS_ERROR_IF_FOUND 0x08 | 65 | #define ACPI_NS_ERROR_IF_FOUND 0x08 |
66 | #define ACPI_NS_PREFIX_IS_SCOPE 0x10 | 66 | #define ACPI_NS_PREFIX_IS_SCOPE 0x10 |
67 | #define ACPI_NS_EXTERNAL 0x20 | ||
67 | 68 | ||
68 | #define ACPI_NS_WALK_UNLOCK TRUE | 69 | #define ACPI_NS_WALK_UNLOCK TRUE |
69 | #define ACPI_NS_WALK_NO_UNLOCK FALSE | 70 | #define ACPI_NS_WALK_NO_UNLOCK FALSE |
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index a5264fac696e..982e7ea177e3 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -50,12 +50,17 @@ | |||
50 | #include "platform/acenv.h" | 50 | #include "platform/acenv.h" |
51 | #include "actypes.h" | 51 | #include "actypes.h" |
52 | 52 | ||
53 | /* Priorities for acpi_os_queue_for_execution */ | 53 | /* Types for acpi_os_execute */ |
54 | 54 | ||
55 | #define OSD_PRIORITY_GPE 1 | 55 | typedef enum { |
56 | #define OSD_PRIORITY_HIGH 2 | 56 | OSL_GLOBAL_LOCK_HANDLER, |
57 | #define OSD_PRIORITY_MED 3 | 57 | OSL_NOTIFY_HANDLER, |
58 | #define OSD_PRIORITY_LO 4 | 58 | OSL_GPE_HANDLER, |
59 | OSL_DEBUGGER_THREAD, | ||
60 | OSL_EC_POLL_HANDLER, | ||
61 | OSL_EC_BURST_HANDLER, | ||
62 | |||
63 | } acpi_execute_type; | ||
59 | 64 | ||
60 | #define ACPI_NO_UNIT_LIMIT ((u32) -1) | 65 | #define ACPI_NO_UNIT_LIMIT ((u32) -1) |
61 | #define ACPI_MUTEX_SEM 1 | 66 | #define ACPI_MUTEX_SEM 1 |
@@ -164,8 +169,8 @@ acpi_os_remove_interrupt_handler(u32 gsi, acpi_osd_handler service_routine); | |||
164 | acpi_thread_id acpi_os_get_thread_id(void); | 169 | acpi_thread_id acpi_os_get_thread_id(void); |
165 | 170 | ||
166 | acpi_status | 171 | acpi_status |
167 | acpi_os_queue_for_execution(u32 priority, | 172 | acpi_os_execute(acpi_execute_type type, |
168 | acpi_osd_exec_callback function, void *context); | 173 | acpi_osd_exec_callback function, void *context); |
169 | 174 | ||
170 | void acpi_os_wait_events_complete(void *context); | 175 | void acpi_os_wait_events_complete(void *context); |
171 | 176 | ||
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index e1a40135f707..b125ceed9cb7 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h | |||
@@ -206,8 +206,8 @@ struct acpi_common_facs { | |||
206 | u32 V1_pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */ \ | 206 | u32 V1_pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */ \ |
207 | u32 V1_gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */ \ | 207 | u32 V1_gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */ \ |
208 | u32 V1_gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */ \ | 208 | u32 V1_gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */ \ |
209 | u8 pm1_evt_len; /* Byte length of ports at pm1_x_evt_blk */ \ | 209 | u8 pm1_evt_len; /* Byte Length of ports at pm1_x_evt_blk */ \ |
210 | u8 pm1_cnt_len; /* Byte length of ports at pm1_x_cnt_blk */ \ | 210 | u8 pm1_cnt_len; /* Byte Length of ports at pm1_x_cnt_blk */ \ |
211 | u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */ \ | 211 | u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */ \ |
212 | u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */ \ | 212 | u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */ \ |
213 | u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */ \ | 213 | u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */ \ |
@@ -252,7 +252,7 @@ struct fadt_descriptor { | |||
252 | u8 S4rtc_sts_valid:1; /* 16: Contents of RTC_STS valid after S4 wake (ACPI 3.0) */ | 252 | u8 S4rtc_sts_valid:1; /* 16: Contents of RTC_STS valid after S4 wake (ACPI 3.0) */ |
253 | u8 remote_power_on_capable:1; /* 17: System is compatible with remote power on (ACPI 3.0) */ | 253 | u8 remote_power_on_capable:1; /* 17: System is compatible with remote power on (ACPI 3.0) */ |
254 | u8 force_apic_cluster_model:1; /* 18: All local APICs must use cluster model (ACPI 3.0) */ | 254 | u8 force_apic_cluster_model:1; /* 18: All local APICs must use cluster model (ACPI 3.0) */ |
255 | u8 force_apic_physical_destination_mode:1; /* 19: all local x_aPICs must use physical dest mode (ACPI 3.0) */ | 255 | u8 force_apic_physical_destination_mode:1; /* 19: All local x_aPICs must use physical dest mode (ACPI 3.0) */ |
256 | u8:4; /* 20-23: Reserved, must be zero */ | 256 | u8:4; /* 20-23: Reserved, must be zero */ |
257 | u8 reserved3; /* 24-31: Reserved, must be zero */ | 257 | u8 reserved3; /* 24-31: Reserved, must be zero */ |
258 | 258 | ||
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 6d4e743a753b..77cf1236b05a 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -971,7 +971,7 @@ struct acpi_mem_space_context { | |||
971 | * Definitions for Resource Attributes | 971 | * Definitions for Resource Attributes |
972 | */ | 972 | */ |
973 | typedef u16 acpi_rs_length; /* Resource Length field is fixed at 16 bits */ | 973 | typedef u16 acpi_rs_length; /* Resource Length field is fixed at 16 bits */ |
974 | typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (length+3) = (64_k-1)+3 */ | 974 | typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (Length+3) = (64_k-1)+3 */ |
975 | 975 | ||
976 | /* | 976 | /* |
977 | * Memory Attributes | 977 | * Memory Attributes |
@@ -986,8 +986,8 @@ typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (length+3) = (6 | |||
986 | 986 | ||
987 | /* | 987 | /* |
988 | * IO Attributes | 988 | * IO Attributes |
989 | * The ISA Io ranges are: n000-n0_ffh, n400-n4_ffh, n800-n8_ffh, n_c00-n_cFFh. | 989 | * The ISA IO ranges are: n000-n0_fFh, n400-n4_fFh, n800-n8_fFh, n_c00-n_cFFh. |
990 | * The non-ISA Io ranges are: n100-n3_ffh, n500-n7_ffh, n900-n_bFfh, n_cd0-n_fFFh. | 990 | * The non-ISA IO ranges are: n100-n3_fFh, n500-n7_fFh, n900-n_bFFh, n_cd0-n_fFFh. |
991 | */ | 991 | */ |
992 | #define ACPI_NON_ISA_ONLY_RANGES (u8) 0x01 | 992 | #define ACPI_NON_ISA_ONLY_RANGES (u8) 0x01 |
993 | #define ACPI_ISA_ONLY_RANGES (u8) 0x02 | 993 | #define ACPI_ISA_ONLY_RANGES (u8) 0x02 |
diff --git a/include/acpi/amlcode.h b/include/acpi/amlcode.h index 37964a59aef8..cf18426a87b1 100644 --- a/include/acpi/amlcode.h +++ b/include/acpi/amlcode.h | |||
@@ -180,8 +180,10 @@ | |||
180 | #define AML_BANK_FIELD_OP (u16) 0x5b87 | 180 | #define AML_BANK_FIELD_OP (u16) 0x5b87 |
181 | #define AML_DATA_REGION_OP (u16) 0x5b88 /* ACPI 2.0 */ | 181 | #define AML_DATA_REGION_OP (u16) 0x5b88 /* ACPI 2.0 */ |
182 | 182 | ||
183 | /* Bogus opcodes (they are actually two separate opcodes) */ | 183 | /* |
184 | 184 | * Combination opcodes (actually two one-byte opcodes) | |
185 | * Used by the disassembler and i_aSL compiler | ||
186 | */ | ||
185 | #define AML_LGREATEREQUAL_OP (u16) 0x9295 | 187 | #define AML_LGREATEREQUAL_OP (u16) 0x9295 |
186 | #define AML_LLESSEQUAL_OP (u16) 0x9294 | 188 | #define AML_LLESSEQUAL_OP (u16) 0x9294 |
187 | #define AML_LNOTEQUAL_OP (u16) 0x9293 | 189 | #define AML_LNOTEQUAL_OP (u16) 0x9293 |
diff --git a/include/acpi/amlresrc.h b/include/acpi/amlresrc.h index 64736860bdd5..be03818af9d1 100644 --- a/include/acpi/amlresrc.h +++ b/include/acpi/amlresrc.h | |||
@@ -47,8 +47,6 @@ | |||
47 | #ifndef __AMLRESRC_H | 47 | #ifndef __AMLRESRC_H |
48 | #define __AMLRESRC_H | 48 | #define __AMLRESRC_H |
49 | 49 | ||
50 | /*! [Begin] no source code translation */ | ||
51 | |||
52 | /* | 50 | /* |
53 | * Resource descriptor tags, as defined in the ACPI specification. | 51 | * Resource descriptor tags, as defined in the ACPI specification. |
54 | * Used to symbolically reference fields within a descriptor. | 52 | * Used to symbolically reference fields within a descriptor. |
@@ -65,12 +63,12 @@ | |||
65 | #define ACPI_RESTAG_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */ | 63 | #define ACPI_RESTAG_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */ |
66 | #define ACPI_RESTAG_GRANULARITY "_GRA" | 64 | #define ACPI_RESTAG_GRANULARITY "_GRA" |
67 | #define ACPI_RESTAG_INTERRUPT "_INT" | 65 | #define ACPI_RESTAG_INTERRUPT "_INT" |
68 | #define ACPI_RESTAG_INTERRUPTLEVEL "_LL_" /* ActiveLo(1), ActiveHi(0) */ | 66 | #define ACPI_RESTAG_INTERRUPTLEVEL "_LL_" /* active_lo(1), active_hi(0) */ |
69 | #define ACPI_RESTAG_INTERRUPTSHARE "_SHR" /* Shareable(1), NoShare(0) */ | 67 | #define ACPI_RESTAG_INTERRUPTSHARE "_SHR" /* Shareable(1), no_share(0) */ |
70 | #define ACPI_RESTAG_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */ | 68 | #define ACPI_RESTAG_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */ |
71 | #define ACPI_RESTAG_LENGTH "_LEN" | 69 | #define ACPI_RESTAG_LENGTH "_LEN" |
72 | #define ACPI_RESTAG_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */ | 70 | #define ACPI_RESTAG_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */ |
73 | #define ACPI_RESTAG_MEMTYPE "_MEM" /* NonCache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */ | 71 | #define ACPI_RESTAG_MEMTYPE "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */ |
74 | #define ACPI_RESTAG_MAXADDR "_MAX" | 72 | #define ACPI_RESTAG_MAXADDR "_MAX" |
75 | #define ACPI_RESTAG_MINADDR "_MIN" | 73 | #define ACPI_RESTAG_MINADDR "_MIN" |
76 | #define ACPI_RESTAG_MAXTYPE "_MAF" | 74 | #define ACPI_RESTAG_MAXTYPE "_MAF" |
@@ -78,12 +76,11 @@ | |||
78 | #define ACPI_RESTAG_REGISTERBITOFFSET "_RBO" | 76 | #define ACPI_RESTAG_REGISTERBITOFFSET "_RBO" |
79 | #define ACPI_RESTAG_REGISTERBITWIDTH "_RBW" | 77 | #define ACPI_RESTAG_REGISTERBITWIDTH "_RBW" |
80 | #define ACPI_RESTAG_RANGETYPE "_RNG" | 78 | #define ACPI_RESTAG_RANGETYPE "_RNG" |
81 | #define ACPI_RESTAG_READWRITETYPE "_RW_" /* ReadOnly(0), Writeable (1) */ | 79 | #define ACPI_RESTAG_READWRITETYPE "_RW_" /* read_only(0), Writeable (1) */ |
82 | #define ACPI_RESTAG_TRANSLATION "_TRA" | 80 | #define ACPI_RESTAG_TRANSLATION "_TRA" |
83 | #define ACPI_RESTAG_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */ | 81 | #define ACPI_RESTAG_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */ |
84 | #define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */ | 82 | #define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */ |
85 | #define ACPI_RESTAG_XFERTYPE "_SIZ" /* 8(0), 8And16(1), 16(2) */ | 83 | #define ACPI_RESTAG_XFERTYPE "_SIZ" /* 8(0), 8_and16(1), 16(2) */ |
86 | /*! [End] no source code translation !*/ | ||
87 | 84 | ||
88 | /* Default sizes for "small" resource descriptors */ | 85 | /* Default sizes for "small" resource descriptors */ |
89 | 86 | ||
@@ -306,9 +303,9 @@ union aml_resource { | |||
306 | /* Utility overlays */ | 303 | /* Utility overlays */ |
307 | 304 | ||
308 | struct aml_resource_address address; | 305 | struct aml_resource_address address; |
309 | u32 u32_item; | 306 | u32 dword_item; |
310 | u16 u16_item; | 307 | u16 word_item; |
311 | u8 U8item; | 308 | u8 byte_item; |
312 | }; | 309 | }; |
313 | 310 | ||
314 | #endif | 311 | #endif |