aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2012-12-19 00:36:49 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-10 06:36:17 -0500
commit75c8044fb38051713000e0d151852f5f9614f77b (patch)
tree00a49eca82954bf008c47330bffc6342b687706f
parent9931faca02c604c22335f5a935a501bb2ace6e20 (diff)
ACPICA: Cleanup updated comments.
This is a cosmetic patch only. Comparison of the resulting binary showed only line number differences. This patch does not affect the generation of the Linux binary. This patch decreases 558 lines of 20121018 divergence.diff. This patch reduces the source code diff between Linux and ACPICA by cleaning the comments that already have been updated in ACPICA. There is no extra indentation done in this patch. Even the empty line deletions and insertions are also splitted into another cleanup patch so that this patch can be easily reviewed, and the binary differences can be held to a lowest level. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/acpica/aclocal.h14
-rw-r--r--drivers/acpi/acpica/acobject.h2
-rw-r--r--drivers/acpi/acpica/acpredef.h14
-rw-r--r--drivers/acpi/acpica/dsopcode.c14
-rw-r--r--drivers/acpi/acpica/evgpe.c4
-rw-r--r--drivers/acpi/acpica/evxface.c21
-rw-r--r--drivers/acpi/acpica/evxfevnt.c4
-rw-r--r--drivers/acpi/acpica/evxfgpe.c8
-rw-r--r--drivers/acpi/acpica/exconfig.c8
-rw-r--r--drivers/acpi/acpica/exmutex.c2
-rw-r--r--drivers/acpi/acpica/exregion.c12
-rw-r--r--drivers/acpi/acpica/hwesleep.c1
-rw-r--r--drivers/acpi/acpica/hwregs.c2
-rw-r--r--drivers/acpi/acpica/hwxface.c10
-rw-r--r--drivers/acpi/acpica/hwxfsleep.c7
-rw-r--r--drivers/acpi/acpica/nsdump.c4
-rw-r--r--drivers/acpi/acpica/nsinit.c5
-rw-r--r--drivers/acpi/acpica/nsnames.c3
-rw-r--r--drivers/acpi/acpica/nspredef.c1
-rw-r--r--drivers/acpi/acpica/nsxfeval.c1
-rw-r--r--drivers/acpi/acpica/tbfadt.c5
-rw-r--r--drivers/acpi/acpica/utglobal.c1
-rw-r--r--drivers/acpi/acpica/utobject.c2
-rw-r--r--drivers/acpi/acpica/utxferror.c4
-rw-r--r--include/acpi/acconfig.h2
-rw-r--r--include/acpi/acpixf.h10
-rw-r--r--include/acpi/actbl1.h6
-rw-r--r--include/acpi/actypes.h4
-rw-r--r--include/acpi/platform/acenv.h44
29 files changed, 111 insertions, 104 deletions
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index ff8bd0061e8b..3453ea68a296 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -189,11 +189,10 @@ struct acpi_namespace_node {
189#define ANOBJ_EVALUATED 0x20 /* Set on first evaluation of node */ 189#define ANOBJ_EVALUATED 0x20 /* Set on first evaluation of node */
190#define ANOBJ_ALLOCATED_BUFFER 0x40 /* Method AML buffer is dynamic (install_method) */ 190#define ANOBJ_ALLOCATED_BUFFER 0x40 /* Method AML buffer is dynamic (install_method) */
191 191
192#define ANOBJ_IS_EXTERNAL 0x08 /* i_aSL only: This object created via External() */ 192#define ANOBJ_IS_EXTERNAL 0x08 /* iASL only: This object created via External() */
193#define ANOBJ_METHOD_NO_RETVAL 0x10 /* i_aSL only: Method has no return value */ 193#define ANOBJ_METHOD_NO_RETVAL 0x10 /* iASL only: Method has no return value */
194#define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* i_aSL only: Method has at least one return value */ 194#define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* iASL only: Method has at least one return value */
195#define ANOBJ_IS_BIT_OFFSET 0x40 /* i_aSL only: Reference is a bit offset */ 195#define ANOBJ_IS_REFERENCED 0x80 /* iASL only: Object was referenced */
196#define ANOBJ_IS_REFERENCED 0x80 /* i_aSL only: Object was referenced */
197 196
198/* Internal ACPI table management - master table list */ 197/* Internal ACPI table management - master table list */
199 198
@@ -416,6 +415,10 @@ struct acpi_gpe_notify_object {
416 struct acpi_gpe_notify_object *next; 415 struct acpi_gpe_notify_object *next;
417}; 416};
418 417
418/*
419 * GPE dispatch info. At any time, the GPE can have at most one type
420 * of dispatch - Method, Handler, or Implicit Notify.
421 */
419union acpi_gpe_dispatch_info { 422union acpi_gpe_dispatch_info {
420 struct acpi_namespace_node *method_node; /* Method node for this GPE level */ 423 struct acpi_namespace_node *method_node; /* Method node for this GPE level */
421 struct acpi_gpe_handler_info *handler; /* Installed GPE handler */ 424 struct acpi_gpe_handler_info *handler; /* Installed GPE handler */
@@ -679,6 +682,7 @@ struct acpi_opcode_info {
679 u8 type; /* Opcode type */ 682 u8 type; /* Opcode type */
680}; 683};
681 684
685/* Value associated with the parse object */
682union acpi_parse_value { 686union acpi_parse_value {
683 u64 integer; /* Integer constant (Up to 64 bits) */ 687 u64 integer; /* Integer constant (Up to 64 bits) */
684 u32 size; /* bytelist or field size */ 688 u32 size; /* bytelist or field size */
diff --git a/drivers/acpi/acpica/acobject.h b/drivers/acpi/acpica/acobject.h
index 24eb9eac9514..921262ea46d7 100644
--- a/drivers/acpi/acpica/acobject.h
+++ b/drivers/acpi/acpica/acobject.h
@@ -307,7 +307,7 @@ struct acpi_object_addr_handler {
307 struct acpi_namespace_node *node; /* Parent device */ 307 struct acpi_namespace_node *node; /* Parent device */
308 void *context; 308 void *context;
309 acpi_adr_space_setup setup; 309 acpi_adr_space_setup setup;
310 union acpi_operand_object *region_list; /* regions using this handler */ 310 union acpi_operand_object *region_list; /* Regions using this handler */
311 union acpi_operand_object *next; 311 union acpi_operand_object *next;
312}; 312};
313 313
diff --git a/drivers/acpi/acpica/acpredef.h b/drivers/acpi/acpica/acpredef.h
index 9dfa1c83bd4e..55fff568561e 100644
--- a/drivers/acpi/acpica/acpredef.h
+++ b/drivers/acpi/acpica/acpredef.h
@@ -1,7 +1,6 @@
1/****************************************************************************** 1/******************************************************************************
2 * 2 *
3 * Name: acpredef - Information table for ACPI predefined methods and objects 3 * Name: acpredef - Information table for ACPI predefined methods and objects
4 * $Revision: 1.1 $
5 * 4 *
6 *****************************************************************************/ 5 *****************************************************************************/
7 6
@@ -51,13 +50,13 @@
51 * 50 *
52 * 1) PTYPE1 packages do not contain sub-packages. 51 * 1) PTYPE1 packages do not contain sub-packages.
53 * 52 *
54 * ACPI_PTYPE1_FIXED: Fixed length, 1 or 2 object types: 53 * ACPI_PTYPE1_FIXED: Fixed-length length, 1 or 2 object types:
55 * object type 54 * object type
56 * count 55 * count
57 * object type 56 * object type
58 * count 57 * count
59 * 58 *
60 * ACPI_PTYPE1_VAR: Variable length: 59 * ACPI_PTYPE1_VAR: Variable-length length:
61 * object type (Int/Buf/Ref) 60 * object type (Int/Buf/Ref)
62 * 61 *
63 * ACPI_PTYPE1_OPTION: Package has some required and some optional elements 62 * ACPI_PTYPE1_OPTION: Package has some required and some optional elements
@@ -85,10 +84,10 @@
85 * count 84 * count
86 * (Used for _CST) 85 * (Used for _CST)
87 * 86 *
88 * ACPI_PTYPE2_FIXED: Each subpackage is of fixed length 87 * ACPI_PTYPE2_FIXED: Each subpackage is of Fixed-length
89 * (Used for _PRT) 88 * (Used for _PRT)
90 * 89 *
91 * ACPI_PTYPE2_MIN: Each subpackage has a variable but minimum length 90 * ACPI_PTYPE2_MIN: Each subpackage has a Variable-length but minimum length
92 * (Used for _HPX) 91 * (Used for _HPX)
93 * 92 *
94 * ACPI_PTYPE2_REV_FIXED: Revision at start, each subpackage is Fixed-length 93 * ACPI_PTYPE2_REV_FIXED: Revision at start, each subpackage is Fixed-length
@@ -124,7 +123,8 @@ enum acpi_return_package_types {
124 * These are the names that can actually be evaluated via acpi_evaluate_object. 123 * These are the names that can actually be evaluated via acpi_evaluate_object.
125 * Not present in this table are the following: 124 * Not present in this table are the following:
126 * 125 *
127 * 1) Predefined/Reserved names that are never evaluated via acpi_evaluate_object: 126 * 1) Predefined/Reserved names that are never evaluated via
127 * acpi_evaluate_object:
128 * _Lxx and _Exx GPE methods 128 * _Lxx and _Exx GPE methods
129 * _Qxx EC methods 129 * _Qxx EC methods
130 * _T_x compiler temporary variables 130 * _T_x compiler temporary variables
@@ -149,6 +149,8 @@ enum acpi_return_package_types {
149 * information about the expected structure of the package. This information 149 * information about the expected structure of the package. This information
150 * is saved here (rather than in a separate table) in order to minimize the 150 * is saved here (rather than in a separate table) in order to minimize the
151 * overall size of the stored data. 151 * overall size of the stored data.
152 *
153 * Note: The additional braces are intended to promote portability.
152 */ 154 */
153static const union acpi_predefined_info predefined_names[] = { 155static const union acpi_predefined_info predefined_names[] = {
154 {{"_AC0", 0, ACPI_RTYPE_INTEGER}}, 156 {{"_AC0", 0, ACPI_RTYPE_INTEGER}},
diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c
index d09c6b4bab2c..25d19252a13d 100644
--- a/drivers/acpi/acpica/dsopcode.c
+++ b/drivers/acpi/acpica/dsopcode.c
@@ -486,18 +486,18 @@ acpi_ds_eval_table_region_operands(struct acpi_walk_state *walk_state,
486 ACPI_FUNCTION_TRACE_PTR(ds_eval_table_region_operands, op); 486 ACPI_FUNCTION_TRACE_PTR(ds_eval_table_region_operands, op);
487 487
488 /* 488 /*
489 * This is where we evaluate the signature_string and oem_iDString 489 * This is where we evaluate the Signature string, oem_id string,
490 * and oem_table_iDString of the data_table_region declaration 490 * and oem_table_id string of the Data Table Region declaration
491 */ 491 */
492 node = op->common.node; 492 node = op->common.node;
493 493
494 /* next_op points to signature_string op */ 494 /* next_op points to Signature string op */
495 495
496 next_op = op->common.value.arg; 496 next_op = op->common.value.arg;
497 497
498 /* 498 /*
499 * Evaluate/create the signature_string and oem_iDString 499 * Evaluate/create the Signature string, oem_id string,
500 * and oem_table_iDString operands 500 * and oem_table_id string operands
501 */ 501 */
502 status = acpi_ds_create_operands(walk_state, next_op); 502 status = acpi_ds_create_operands(walk_state, next_op);
503 if (ACPI_FAILURE(status)) { 503 if (ACPI_FAILURE(status)) {
@@ -505,8 +505,8 @@ acpi_ds_eval_table_region_operands(struct acpi_walk_state *walk_state,
505 } 505 }
506 506
507 /* 507 /*
508 * Resolve the signature_string and oem_iDString 508 * Resolve the Signature string, oem_id string,
509 * and oem_table_iDString operands 509 * and oem_table_id string operands
510 */ 510 */
511 status = acpi_ex_resolve_operands(op->common.aml_opcode, 511 status = acpi_ex_resolve_operands(op->common.aml_opcode,
512 ACPI_WALK_OPERANDS, walk_state); 512 ACPI_WALK_OPERANDS, walk_state);
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
index 36d120574423..a137ce813c50 100644
--- a/drivers/acpi/acpica/evgpe.c
+++ b/drivers/acpi/acpica/evgpe.c
@@ -561,8 +561,8 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
561 status = AE_NO_MEMORY; 561 status = AE_NO_MEMORY;
562 } else { 562 } else {
563 /* 563 /*
564 * Invoke the GPE Method (_Lxx, _Exx) i.e., evaluate the _Lxx/_Exx 564 * Invoke the GPE Method (_Lxx, _Exx) i.e., evaluate the
565 * control method that corresponds to this GPE 565 * _Lxx/_Exx control method that corresponds to this GPE
566 */ 566 */
567 info->prefix_node = 567 info->prefix_node =
568 local_gpe_event_info->dispatch.method_node; 568 local_gpe_event_info->dispatch.method_node;
diff --git a/drivers/acpi/acpica/evxface.c b/drivers/acpi/acpica/evxface.c
index ae668f32cf16..76cfe71c6b28 100644
--- a/drivers/acpi/acpica/evxface.c
+++ b/drivers/acpi/acpica/evxface.c
@@ -56,13 +56,13 @@ ACPI_MODULE_NAME("evxface")
56 * 56 *
57 * FUNCTION: acpi_install_notify_handler 57 * FUNCTION: acpi_install_notify_handler
58 * 58 *
59 * PARAMETERS: Device - The device for which notifies will be handled 59 * PARAMETERS: device - The device for which notifies will be handled
60 * handler_type - The type of handler: 60 * handler_type - The type of handler:
61 * ACPI_SYSTEM_NOTIFY: System Handler (00-7F) 61 * ACPI_SYSTEM_NOTIFY: System Handler (00-7F)
62 * ACPI_DEVICE_NOTIFY: Device Handler (80-FF) 62 * ACPI_DEVICE_NOTIFY: Device Handler (80-FF)
63 * ACPI_ALL_NOTIFY: Both System and Device 63 * ACPI_ALL_NOTIFY: Both System and Device
64 * Handler - Address of the handler 64 * handler - Address of the handler
65 * Context - Value passed to the handler on each GPE 65 * context - Value passed to the handler on each GPE
66 * 66 *
67 * RETURN: Status 67 * RETURN: Status
68 * 68 *
@@ -217,12 +217,12 @@ ACPI_EXPORT_SYMBOL(acpi_install_notify_handler)
217 * 217 *
218 * FUNCTION: acpi_remove_notify_handler 218 * FUNCTION: acpi_remove_notify_handler
219 * 219 *
220 * PARAMETERS: Device - The device for which the handler is installed 220 * PARAMETERS: device - The device for which the handler is installed
221 * handler_type - The type of handler: 221 * handler_type - The type of handler:
222 * ACPI_SYSTEM_NOTIFY: System Handler (00-7F) 222 * ACPI_SYSTEM_NOTIFY: System Handler (00-7F)
223 * ACPI_DEVICE_NOTIFY: Device Handler (80-FF) 223 * ACPI_DEVICE_NOTIFY: Device Handler (80-FF)
224 * ACPI_ALL_NOTIFY: Both System and Device 224 * ACPI_ALL_NOTIFY: Both System and Device
225 * Handler - Address of the handler 225 * handler - Address of the handler
226 * 226 *
227 * RETURN: Status 227 * RETURN: Status
228 * 228 *
@@ -249,7 +249,7 @@ acpi_remove_notify_handler(acpi_handle device,
249 (handler_type > ACPI_MAX_NOTIFY_HANDLER_TYPE)) { 249 (handler_type > ACPI_MAX_NOTIFY_HANDLER_TYPE)) {
250 return_ACPI_STATUS(AE_BAD_PARAMETER); 250 return_ACPI_STATUS(AE_BAD_PARAMETER);
251 } 251 }
252 /* Make sure all deferred tasks are completed */ 252 /* Make sure all deferred notify tasks are completed */
253 253
254 acpi_os_wait_events_complete(); 254 acpi_os_wait_events_complete();
255 255
@@ -596,7 +596,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
596 return_ACPI_STATUS(status); 596 return_ACPI_STATUS(status);
597 } 597 }
598 598
599 /* Allocate memory for the handler object */ 599 /* Allocate and init handler object (before lock) */
600 600
601 handler = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_gpe_handler_info)); 601 handler = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_gpe_handler_info));
602 if (!handler) { 602 if (!handler) {
@@ -622,7 +622,6 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
622 goto free_and_exit; 622 goto free_and_exit;
623 } 623 }
624 624
625 /* Allocate and init handler object */
626 625
627 handler->address = address; 626 handler->address = address;
628 handler->context = context; 627 handler->context = context;
@@ -631,7 +630,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
631 (ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); 630 (ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK);
632 631
633 /* 632 /*
634 * If the GPE is associated with a method, it might have been enabled 633 * If the GPE is associated with a method, it may have been enabled
635 * automatically during initialization, in which case it has to be 634 * automatically during initialization, in which case it has to be
636 * disabled now to avoid spurious execution of the handler. 635 * disabled now to avoid spurious execution of the handler.
637 */ 636 */
@@ -646,7 +645,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
646 645
647 gpe_event_info->dispatch.handler = handler; 646 gpe_event_info->dispatch.handler = handler;
648 647
649 /* Setup up dispatch flags to indicate handler (vs. method) */ 648 /* Setup up dispatch flags to indicate handler (vs. method/notify) */
650 649
651 gpe_event_info->flags &= 650 gpe_event_info->flags &=
652 ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); 651 ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK);
@@ -697,7 +696,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_device,
697 return_ACPI_STATUS(AE_BAD_PARAMETER); 696 return_ACPI_STATUS(AE_BAD_PARAMETER);
698 } 697 }
699 698
700 /* Make sure all deferred tasks are completed */ 699 /* Make sure all deferred GPE tasks are completed */
701 700
702 acpi_os_wait_events_complete(); 701 acpi_os_wait_events_complete();
703 702
diff --git a/drivers/acpi/acpica/evxfevnt.c b/drivers/acpi/acpica/evxfevnt.c
index 35520c6eeefb..ee6e96c9835a 100644
--- a/drivers/acpi/acpica/evxfevnt.c
+++ b/drivers/acpi/acpica/evxfevnt.c
@@ -210,8 +210,8 @@ ACPI_EXPORT_SYMBOL(acpi_enable_event)
210 * 210 *
211 * FUNCTION: acpi_disable_event 211 * FUNCTION: acpi_disable_event
212 * 212 *
213 * PARAMETERS: Event - The fixed eventto be enabled 213 * PARAMETERS: event - The fixed event to be disabled
214 * Flags - Reserved 214 * flags - Reserved
215 * 215 *
216 * RETURN: Status 216 * RETURN: Status
217 * 217 *
diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi/acpica/evxfgpe.c
index 3f30e753b652..d8095c1bda11 100644
--- a/drivers/acpi/acpica/evxfgpe.c
+++ b/drivers/acpi/acpica/evxfgpe.c
@@ -51,7 +51,7 @@
51ACPI_MODULE_NAME("evxfgpe") 51ACPI_MODULE_NAME("evxfgpe")
52 52
53#if (!ACPI_REDUCED_HARDWARE) /* Entire module */ 53#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
54/****************************************************************************** 54/*******************************************************************************
55 * 55 *
56 * FUNCTION: acpi_update_all_gpes 56 * FUNCTION: acpi_update_all_gpes
57 * 57 *
@@ -225,7 +225,7 @@ acpi_setup_gpe_for_wake(acpi_handle wake_device,
225 ACPI_CAST_PTR(struct acpi_namespace_node, wake_device); 225 ACPI_CAST_PTR(struct acpi_namespace_node, wake_device);
226 } 226 }
227 227
228 /* Validate WakeDevice is of type Device */ 228 /* Validate wake_device is of type Device */
229 229
230 if (device_node->type != ACPI_TYPE_DEVICE) { 230 if (device_node->type != ACPI_TYPE_DEVICE) {
231 return_ACPI_STATUS (AE_BAD_PARAMETER); 231 return_ACPI_STATUS (AE_BAD_PARAMETER);
@@ -432,8 +432,8 @@ ACPI_EXPORT_SYMBOL(acpi_clear_gpe)
432 * 432 *
433 * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 433 * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1
434 * gpe_number - GPE level within the GPE block 434 * gpe_number - GPE level within the GPE block
435 * event_status - Where the current status of the event will 435 * event_status - Where the current status of the event
436 * be returned 436 * will be returned
437 * 437 *
438 * RETURN: Status 438 * RETURN: Status
439 * 439 *
diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c
index 16219bde48da..9ad64204495e 100644
--- a/drivers/acpi/acpica/exconfig.c
+++ b/drivers/acpi/acpica/exconfig.c
@@ -120,7 +120,11 @@ acpi_ex_add_table(u32 table_index,
120 acpi_ns_exec_module_code_list(); 120 acpi_ns_exec_module_code_list();
121 acpi_ex_enter_interpreter(); 121 acpi_ex_enter_interpreter();
122 122
123 /* Update GPEs for any new _Lxx/_Exx methods. Ignore errors */ 123 /*
124 * Update GPEs for any new _Lxx/_Exx methods. Ignore errors. The host is
125 * responsible for discovering any new wake GPEs by running _PRW methods
126 * that may have been loaded by this table.
127 */
124 128
125 status = acpi_tb_get_owner_id(table_index, &owner_id); 129 status = acpi_tb_get_owner_id(table_index, &owner_id);
126 if (ACPI_SUCCESS(status)) { 130 if (ACPI_SUCCESS(status)) {
@@ -158,7 +162,7 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
158 162
159 ACPI_FUNCTION_TRACE(ex_load_table_op); 163 ACPI_FUNCTION_TRACE(ex_load_table_op);
160 164
161 /* Validate lengths for the signature_string, OEMIDString, OEMtable_iD */ 165 /* Validate lengths for the Signature, oem_id, and oem_table_id strings */
162 166
163 if ((operand[0]->string.length > ACPI_NAME_SIZE) || 167 if ((operand[0]->string.length > ACPI_NAME_SIZE) ||
164 (operand[1]->string.length > ACPI_OEM_ID_SIZE) || 168 (operand[1]->string.length > ACPI_OEM_ID_SIZE) ||
diff --git a/drivers/acpi/acpica/exmutex.c b/drivers/acpi/acpica/exmutex.c
index d1f449d93dcf..900a25155331 100644
--- a/drivers/acpi/acpica/exmutex.c
+++ b/drivers/acpi/acpica/exmutex.c
@@ -377,7 +377,7 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
377 return_ACPI_STATUS(AE_AML_MUTEX_NOT_ACQUIRED); 377 return_ACPI_STATUS(AE_AML_MUTEX_NOT_ACQUIRED);
378 } 378 }
379 379
380 /* Must have a valid thread. */ 380 /* Must have a valid thread ID */
381 if (!walk_state->thread) { 381 if (!walk_state->thread) {
382 ACPI_ERROR((AE_INFO, 382 ACPI_ERROR((AE_INFO,
383 "Cannot release Mutex [%4.4s], null thread info", 383 "Cannot release Mutex [%4.4s], null thread info",
diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c
index 1db2c0bfde0b..0a01e19c3190 100644
--- a/drivers/acpi/acpica/exregion.c
+++ b/drivers/acpi/acpica/exregion.c
@@ -142,9 +142,9 @@ acpi_ex_system_memory_space_handler(u32 function,
142 } 142 }
143 143
144 /* 144 /*
145 * Attempt to map from the requested address to the end of the region. 145 * October 2009: Attempt to map from the requested address to the
146 * However, we will never map more than one page, nor will we cross 146 * end of the region. However, we will never map more than one
147 * a page boundary. 147 * page, nor will we cross a page boundary.
148 */ 148 */
149 map_length = (acpi_size) 149 map_length = (acpi_size)
150 ((mem_info->address + mem_info->length) - address); 150 ((mem_info->address + mem_info->length) - address);
@@ -154,7 +154,11 @@ acpi_ex_system_memory_space_handler(u32 function,
154 * a page boundary, just map up to the page boundary, do not cross. 154 * a page boundary, just map up to the page boundary, do not cross.
155 * On some systems, crossing a page boundary while mapping regions 155 * On some systems, crossing a page boundary while mapping regions
156 * can cause warnings if the pages have different attributes 156 * can cause warnings if the pages have different attributes
157 * due to resource management 157 * due to resource management.
158 *
159 * This has the added benefit of constraining a single mapping to
160 * one page, which is similar to the original code that used a 4k
161 * maximum window.
158 */ 162 */
159 page_boundary_map_length = 163 page_boundary_map_length =
160 ACPI_ROUND_UP(address, ACPI_DEFAULT_PAGE_SIZE) - address; 164 ACPI_ROUND_UP(address, ACPI_DEFAULT_PAGE_SIZE) - address;
diff --git a/drivers/acpi/acpica/hwesleep.c b/drivers/acpi/acpica/hwesleep.c
index 94996f9ae3ad..6c0b1a9d5a8c 100644
--- a/drivers/acpi/acpica/hwesleep.c
+++ b/drivers/acpi/acpica/hwesleep.c
@@ -200,7 +200,6 @@ acpi_status acpi_hw_extended_wake_prep(u8 sleep_state)
200 * FUNCTION: acpi_hw_extended_wake 200 * FUNCTION: acpi_hw_extended_wake
201 * 201 *
202 * PARAMETERS: sleep_state - Which sleep state we just exited 202 * PARAMETERS: sleep_state - Which sleep state we just exited
203 * flags - Reserved, set to zero
204 * 203 *
205 * RETURN: Status 204 * RETURN: Status
206 * 205 *
diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c
index f4e57503576b..165395f1f715 100644
--- a/drivers/acpi/acpica/hwregs.c
+++ b/drivers/acpi/acpica/hwregs.c
@@ -485,7 +485,7 @@ acpi_status acpi_hw_register_write(u32 register_id, u32 value)
485 &acpi_gbl_xpm1b_status); 485 &acpi_gbl_xpm1b_status);
486 break; 486 break;
487 487
488 case ACPI_REGISTER_PM1_ENABLE: /* PM1 A/B: 16-bit access */ 488 case ACPI_REGISTER_PM1_ENABLE: /* PM1 A/B: 16-bit access each */
489 489
490 status = acpi_hw_write_multiple(value, 490 status = acpi_hw_write_multiple(value,
491 &acpi_gbl_xpm1a_enable, 491 &acpi_gbl_xpm1a_enable,
diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c
index 05a154c3c9ac..e835645dde97 100644
--- a/drivers/acpi/acpica/hwxface.c
+++ b/drivers/acpi/acpica/hwxface.c
@@ -80,10 +80,10 @@ acpi_status acpi_reset(void)
80 80
81 if (reset_reg->space_id == ACPI_ADR_SPACE_SYSTEM_IO) { 81 if (reset_reg->space_id == ACPI_ADR_SPACE_SYSTEM_IO) {
82 /* 82 /*
83 * For I/O space, write directly to the OSL. This 83 * For I/O space, write directly to the OSL. This bypasses the port
84 * bypasses the port validation mechanism, which may 84 * validation mechanism, which may block a valid write to the reset
85 * block a valid write to the reset register. Spec 85 * register.
86 * section 4.7.3.6 requires register width to be 8. 86 * Spec section 4.7.3.6 requires register width to be 8.
87 */ 87 */
88 status = 88 status =
89 acpi_os_write_port((acpi_io_address) reset_reg->address, 89 acpi_os_write_port((acpi_io_address) reset_reg->address,
@@ -333,7 +333,7 @@ ACPI_EXPORT_SYMBOL(acpi_read_bit_register)
333 * FUNCTION: acpi_write_bit_register 333 * FUNCTION: acpi_write_bit_register
334 * 334 *
335 * PARAMETERS: register_id - ID of ACPI Bit Register to access 335 * PARAMETERS: register_id - ID of ACPI Bit Register to access
336 * Value - Value to write to the register, in bit 336 * value - Value to write to the register, in bit
337 * position zero. The bit is automatically 337 * position zero. The bit is automatically
338 * shifted to the correct position. 338 * shifted to the correct position.
339 * 339 *
diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c
index ae443fe2ebf6..2898011ef12b 100644
--- a/drivers/acpi/acpica/hwxfsleep.c
+++ b/drivers/acpi/acpica/hwxfsleep.c
@@ -350,7 +350,7 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep)
350 * 350 *
351 * RETURN: Status 351 * RETURN: Status
352 * 352 *
353 * DESCRIPTION: Enter a system sleep state (see ACPI 2.0 spec p 231) 353 * DESCRIPTION: Enter a system sleep state
354 * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED 354 * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
355 * 355 *
356 ******************************************************************************/ 356 ******************************************************************************/
@@ -382,8 +382,9 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state)
382 * RETURN: Status 382 * RETURN: Status
383 * 383 *
384 * DESCRIPTION: Perform the first state of OS-independent ACPI cleanup after a 384 * DESCRIPTION: Perform the first state of OS-independent ACPI cleanup after a
385 * sleep. 385 * sleep. Called with interrupts DISABLED.
386 * Called with interrupts DISABLED. 386 * We break wake/resume into 2 stages so that OSPM can handle
387 * various OS-specific tasks between the two steps.
387 * 388 *
388 ******************************************************************************/ 389 ******************************************************************************/
389acpi_status acpi_leave_sleep_state_prep(u8 sleep_state) 390acpi_status acpi_leave_sleep_state_prep(u8 sleep_state)
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c
index 924b3c71473a..8e6f00370a39 100644
--- a/drivers/acpi/acpica/nsdump.c
+++ b/drivers/acpi/acpica/nsdump.c
@@ -729,5 +729,5 @@ void acpi_ns_dump_tables(acpi_handle search_base, u32 max_depth)
729 ACPI_OWNER_ID_MAX, search_handle); 729 ACPI_OWNER_ID_MAX, search_handle);
730 return_VOID; 730 return_VOID;
731} 731}
732#endif /* _ACPI_ASL_COMPILER */ 732#endif
733#endif /* defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) */ 733#endif
diff --git a/drivers/acpi/acpica/nsinit.c b/drivers/acpi/acpica/nsinit.c
index 4328e2adfeb9..bb6888f5c262 100644
--- a/drivers/acpi/acpica/nsinit.c
+++ b/drivers/acpi/acpica/nsinit.c
@@ -572,11 +572,6 @@ acpi_ns_init_one_device(acpi_handle obj_handle,
572 info->parameters = NULL; 572 info->parameters = NULL;
573 info->flags = ACPI_IGNORE_RETURN_VALUE; 573 info->flags = ACPI_IGNORE_RETURN_VALUE;
574 574
575 /*
576 * Some hardware relies on this being executed as atomically
577 * as possible (without an NMI being received in the middle of
578 * this) - so disable NMIs and initialize the device:
579 */
580 status = acpi_ns_evaluate(info); 575 status = acpi_ns_evaluate(info);
581 576
582 if (ACPI_SUCCESS(status)) { 577 if (ACPI_SUCCESS(status)) {
diff --git a/drivers/acpi/acpica/nsnames.c b/drivers/acpi/acpica/nsnames.c
index 55a175eadcc3..7d34641865ea 100644
--- a/drivers/acpi/acpica/nsnames.c
+++ b/drivers/acpi/acpica/nsnames.c
@@ -126,7 +126,8 @@ acpi_ns_build_external_path(struct acpi_namespace_node *node,
126 * the node, In external format (name segments separated by path 126 * the node, In external format (name segments separated by path
127 * separators.) 127 * separators.)
128 * 128 *
129 * DESCRIPTION: Used for debug printing in acpi_ns_search_table(). 129 * DESCRIPTION: Used to obtain the full pathname to a namespace node, usually
130 * for error and debug statements.
130 * 131 *
131 ******************************************************************************/ 132 ******************************************************************************/
132 133
diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c
index 2419f417ea33..352be3bd1562 100644
--- a/drivers/acpi/acpica/nspredef.c
+++ b/drivers/acpi/acpica/nspredef.c
@@ -1,7 +1,6 @@
1/****************************************************************************** 1/******************************************************************************
2 * 2 *
3 * Module Name: nspredef - Validation of ACPI predefined methods and objects 3 * Module Name: nspredef - Validation of ACPI predefined methods and objects
4 * $Revision: 1.1 $
5 * 4 *
6 *****************************************************************************/ 5 *****************************************************************************/
7 6
diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c
index d6a9f77972b6..70bbc1f9de0d 100644
--- a/drivers/acpi/acpica/nsxfeval.c
+++ b/drivers/acpi/acpica/nsxfeval.c
@@ -606,6 +606,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
606 for (i = 0; i < cid->count; i++) { 606 for (i = 0; i < cid->count; i++) {
607 if (ACPI_STRCMP(cid->ids[i].string, info->hid) 607 if (ACPI_STRCMP(cid->ids[i].string, info->hid)
608 == 0) { 608 == 0) {
609 /* Found a matching CID */
609 found = 1; 610 found = 1;
610 break; 611 break;
611 } 612 }
diff --git a/drivers/acpi/acpica/tbfadt.c b/drivers/acpi/acpica/tbfadt.c
index 390651860bf0..882285bed2c2 100644
--- a/drivers/acpi/acpica/tbfadt.c
+++ b/drivers/acpi/acpica/tbfadt.c
@@ -172,6 +172,7 @@ static struct acpi_fadt_pm_info fadt_pm_info_table[] = {
172 * FUNCTION: acpi_tb_init_generic_address 172 * FUNCTION: acpi_tb_init_generic_address
173 * 173 *
174 * PARAMETERS: generic_address - GAS struct to be initialized 174 * PARAMETERS: generic_address - GAS struct to be initialized
175 * space_id - ACPI Space ID for this register
175 * byte_width - Width of this register 176 * byte_width - Width of this register
176 * address - Address of the register 177 * address - Address of the register
177 * 178 *
@@ -407,8 +408,8 @@ static void acpi_tb_convert_fadt(void)
407 * should be zero are indeed zero. This will workaround BIOSs that 408 * should be zero are indeed zero. This will workaround BIOSs that
408 * inadvertently place values in these fields. 409 * inadvertently place values in these fields.
409 * 410 *
410 * The ACPI 1.0 reserved fields that will be zeroed are the bytes located at 411 * The ACPI 1.0 reserved fields that will be zeroed are the bytes located
411 * offset 45, 55, 95, and the word located at offset 109, 110. 412 * at offset 45, 55, 95, and the word located at offset 109, 110.
412 * 413 *
413 * Note: The FADT revision value is unreliable. Only the length can be 414 * Note: The FADT revision value is unreliable. Only the length can be
414 * trusted. 415 * trusted.
diff --git a/drivers/acpi/acpica/utglobal.c b/drivers/acpi/acpica/utglobal.c
index ed1893155f8b..d7919a321f4d 100644
--- a/drivers/acpi/acpica/utglobal.c
+++ b/drivers/acpi/acpica/utglobal.c
@@ -368,6 +368,7 @@ acpi_status acpi_ut_init_globals(void)
368 return_ACPI_STATUS(AE_OK); 368 return_ACPI_STATUS(AE_OK);
369} 369}
370 370
371/* Public globals */
371ACPI_EXPORT_SYMBOL(acpi_gbl_FADT) 372ACPI_EXPORT_SYMBOL(acpi_gbl_FADT)
372ACPI_EXPORT_SYMBOL(acpi_dbg_level) 373ACPI_EXPORT_SYMBOL(acpi_dbg_level)
373ACPI_EXPORT_SYMBOL(acpi_dbg_layer) 374ACPI_EXPORT_SYMBOL(acpi_dbg_layer)
diff --git a/drivers/acpi/acpica/utobject.c b/drivers/acpi/acpica/utobject.c
index 5c52ca78f6fa..822600bf3876 100644
--- a/drivers/acpi/acpica/utobject.c
+++ b/drivers/acpi/acpica/utobject.c
@@ -419,7 +419,7 @@ void acpi_ut_delete_object_desc(union acpi_operand_object *object)
419{ 419{
420 ACPI_FUNCTION_TRACE_PTR(ut_delete_object_desc, object); 420 ACPI_FUNCTION_TRACE_PTR(ut_delete_object_desc, object);
421 421
422 /* Object must be a union acpi_operand_object */ 422 /* Object must be of type union acpi_operand_object */
423 423
424 if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND) { 424 if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND) {
425 ACPI_ERROR((AE_INFO, 425 ACPI_ERROR((AE_INFO,
diff --git a/drivers/acpi/acpica/utxferror.c b/drivers/acpi/acpica/utxferror.c
index d4d3826140d8..a247a224bee5 100644
--- a/drivers/acpi/acpica/utxferror.c
+++ b/drivers/acpi/acpica/utxferror.c
@@ -297,9 +297,9 @@ ACPI_EXPORT_SYMBOL(acpi_bios_warning)
297 * 297 *
298 * PARAMETERS: module_name - Caller's module name (for error output) 298 * PARAMETERS: module_name - Caller's module name (for error output)
299 * line_number - Caller's line number (for error output) 299 * line_number - Caller's line number (for error output)
300 * Pathname - Full pathname to the node 300 * pathname - Full pathname to the node
301 * node_flags - From Namespace node for the method/object 301 * node_flags - From Namespace node for the method/object
302 * Format - Printf format string + additional args 302 * format - Printf format string + additional args
303 * 303 *
304 * RETURN: None 304 * RETURN: None
305 * 305 *
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 0943457e0fa5..358258ad09f8 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -138,7 +138,7 @@
138 138
139/* Maximum sleep allowed via Sleep() operator */ 139/* Maximum sleep allowed via Sleep() operator */
140 140
141#define ACPI_MAX_SLEEP 2000 /* Two seconds */ 141#define ACPI_MAX_SLEEP 2000 /* 2000 millisec == two seconds */
142 142
143/* Address Range lists are per-space_id (Memory and I/O only) */ 143/* Address Range lists are per-space_id (Memory and I/O only) */
144 144
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 3d88395d4d6f..defbcaa90f40 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -56,11 +56,12 @@
56extern u8 acpi_gbl_permanent_mmap; 56extern u8 acpi_gbl_permanent_mmap;
57 57
58/* 58/*
59 * Globals that are publicly available, allowing for 59 * Globals that are publically available
60 * run time configuration
61 */ 60 */
61/* Runtime configuration of debug print levels */
62extern u32 acpi_dbg_level; 62extern u32 acpi_dbg_level;
63extern u32 acpi_dbg_layer; 63extern u32 acpi_dbg_layer;
64/* ACPICA runtime options */
64extern u8 acpi_gbl_enable_interpreter_slack; 65extern u8 acpi_gbl_enable_interpreter_slack;
65extern u8 acpi_gbl_all_methods_serialized; 66extern u8 acpi_gbl_all_methods_serialized;
66extern u8 acpi_gbl_create_osi_method; 67extern u8 acpi_gbl_create_osi_method;
@@ -106,7 +107,7 @@ extern u8 acpi_gbl_reduced_hardware; /* ACPI 5.0 */
106 107
107extern u32 acpi_rsdt_forced; 108extern u32 acpi_rsdt_forced;
108/* 109/*
109 * Global interfaces 110 * Initialization
110 */ 111 */
111acpi_status 112acpi_status
112acpi_initialize_tables(struct acpi_table_desc *initial_storage, 113acpi_initialize_tables(struct acpi_table_desc *initial_storage,
@@ -124,6 +125,9 @@ acpi_status acpi_terminate(void);
124acpi_status acpi_subsystem_status(void); 125acpi_status acpi_subsystem_status(void);
125#endif 126#endif
126 127
128/*
129 * Miscellaneous global interfaces
130 */
127ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void)) 131ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void))
128ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void)) 132ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void))
129 133
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index 280fc45b59dd..61f04c0dd5cb 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -768,7 +768,7 @@ struct acpi_madt_interrupt_source {
768 768
769struct acpi_madt_local_x2apic { 769struct acpi_madt_local_x2apic {
770 struct acpi_subtable_header header; 770 struct acpi_subtable_header header;
771 u16 reserved; /* Reserved - must be zero */ 771 u16 reserved; /* reserved - must be zero */
772 u32 local_apic_id; /* Processor x2APIC ID */ 772 u32 local_apic_id; /* Processor x2APIC ID */
773 u32 lapic_flags; 773 u32 lapic_flags;
774 u32 uid; /* ACPI processor UID */ 774 u32 uid; /* ACPI processor UID */
@@ -781,14 +781,14 @@ struct acpi_madt_local_x2apic_nmi {
781 u16 inti_flags; 781 u16 inti_flags;
782 u32 uid; /* ACPI processor UID */ 782 u32 uid; /* ACPI processor UID */
783 u8 lint; /* LINTn to which NMI is connected */ 783 u8 lint; /* LINTn to which NMI is connected */
784 u8 reserved[3]; 784 u8 reserved[3]; /* reserved - must be zero */
785}; 785};
786 786
787/* 11: Generic Interrupt (ACPI 5.0) */ 787/* 11: Generic Interrupt (ACPI 5.0) */
788 788
789struct acpi_madt_generic_interrupt { 789struct acpi_madt_generic_interrupt {
790 struct acpi_subtable_header header; 790 struct acpi_subtable_header header;
791 u16 reserved; /* Reserved - must be zero */ 791 u16 reserved; /* reserved - must be zero */
792 u32 gic_id; 792 u32 gic_id;
793 u32 uid; 793 u32 uid;
794 u32 flags; 794 u32 flags;
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 4f43f1fba132..35d4dea0bd37 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -595,7 +595,7 @@ typedef u32 acpi_object_type;
595 595
596/* 596/*
597 * These are special object types that never appear in 597 * These are special object types that never appear in
598 * a Namespace node, only in a union acpi_operand_object 598 * a Namespace node, only in an object of union acpi_operand_object
599 */ 599 */
600#define ACPI_TYPE_LOCAL_EXTRA 0x1C 600#define ACPI_TYPE_LOCAL_EXTRA 0x1C
601#define ACPI_TYPE_LOCAL_DATA 0x1D 601#define ACPI_TYPE_LOCAL_DATA 0x1D
@@ -662,7 +662,7 @@ typedef u32 acpi_event_status;
662#define ACPI_GPE_MAX 0xFF 662#define ACPI_GPE_MAX 0xFF
663#define ACPI_NUM_GPE 256 663#define ACPI_NUM_GPE 256
664 664
665/* Actions for acpi_set_gpe_wake_mask, acpi_hw_low_set_gpe */ 665/* Actions for acpi_set_gpe, acpi_gpe_wakeup, acpi_hw_low_set_gpe */
666 666
667#define ACPI_GPE_ENABLE 0 667#define ACPI_GPE_ENABLE 0
668#define ACPI_GPE_DISABLE 1 668#define ACPI_GPE_DISABLE 1
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index 89cee88dd2a5..e3409b6cefbd 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -1,6 +1,6 @@
1/****************************************************************************** 1/******************************************************************************
2 * 2 *
3 * Name: acenv.h - Generation environment specific items 3 * Name: acenv.h - Host and compiler configuration
4 * 4 *
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
@@ -60,14 +60,12 @@
60 * 60 *
61 *****************************************************************************/ 61 *****************************************************************************/
62 62
63/* Linkable ACPICA library */
63#ifdef ACPI_LIBRARY 64#ifdef ACPI_LIBRARY
64/*
65 * Note: The non-debug version of the acpi_library does not contain any
66 * debug support, for minimal size. The debug version uses ACPI_FULL_DEBUG
67 */
68#define ACPI_USE_LOCAL_CACHE 65#define ACPI_USE_LOCAL_CACHE
69#endif 66#endif
70 67
68/* iASL configuration */
71#ifdef ACPI_ASL_COMPILER 69#ifdef ACPI_ASL_COMPILER
72#define ACPI_DEBUG_OUTPUT 70#define ACPI_DEBUG_OUTPUT
73#define ACPI_APPLICATION 71#define ACPI_APPLICATION
@@ -77,6 +75,7 @@
77#define ACPI_DATA_TABLE_DISASSEMBLY 75#define ACPI_DATA_TABLE_DISASSEMBLY
78#endif 76#endif
79 77
78/* acpi_exec configuration. Multithreaded with full AML debugger */
80#ifdef ACPI_EXEC_APP 79#ifdef ACPI_EXEC_APP
81#undef DEBUGGER_THREADING 80#undef DEBUGGER_THREADING
82#define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED 81#define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED
@@ -87,11 +86,13 @@
87#define ACPI_DBG_TRACK_ALLOCATIONS 86#define ACPI_DBG_TRACK_ALLOCATIONS
88#endif 87#endif
89 88
89/* Common for all ACPICA applications */
90#ifdef ACPI_APPLICATION 90#ifdef ACPI_APPLICATION
91#define ACPI_USE_SYSTEM_CLIBRARY 91#define ACPI_USE_SYSTEM_CLIBRARY
92#define ACPI_USE_LOCAL_CACHE 92#define ACPI_USE_LOCAL_CACHE
93#endif 93#endif
94 94
95/* Common debug support */
95#ifdef ACPI_FULL_DEBUG 96#ifdef ACPI_FULL_DEBUG
96#define ACPI_DEBUGGER 97#define ACPI_DEBUGGER
97#define ACPI_DEBUG_OUTPUT 98#define ACPI_DEBUG_OUTPUT
@@ -186,9 +187,7 @@
186 * 187 *
187 *****************************************************************************/ 188 *****************************************************************************/
188 189
189/* 190/* Type of mutex supported by host. Default is binary semaphores. */
190 * Are mutexes supported by the host? default is no, use binary semaphores.
191 */
192#ifndef ACPI_MUTEX_TYPE 191#ifndef ACPI_MUTEX_TYPE
193#define ACPI_MUTEX_TYPE ACPI_BINARY_SEMAPHORE 192#define ACPI_MUTEX_TYPE ACPI_BINARY_SEMAPHORE
194#endif 193#endif
@@ -230,9 +229,7 @@
230 * We want to keep these to a minimum. 229 * We want to keep these to a minimum.
231 */ 230 */
232#ifdef ACPI_USE_STANDARD_HEADERS 231#ifdef ACPI_USE_STANDARD_HEADERS
233/* 232/* Use the standard headers from the standard locations */
234 * Use the standard headers from the standard locations
235 */
236#include <stdarg.h> 233#include <stdarg.h>
237#include <stdlib.h> 234#include <stdlib.h>
238#include <string.h> 235#include <string.h>
@@ -240,9 +237,7 @@
240 237
241#endif /* ACPI_USE_STANDARD_HEADERS */ 238#endif /* ACPI_USE_STANDARD_HEADERS */
242 239
243/* 240/* We will be linking to the standard Clib functions */
244 * We will be linking to the standard Clib functions
245 */
246#define ACPI_STRSTR(s1,s2) strstr((s1), (s2)) 241#define ACPI_STRSTR(s1,s2) strstr((s1), (s2))
247#define ACPI_STRCHR(s1,c) strchr((s1), (c)) 242#define ACPI_STRCHR(s1,c) strchr((s1), (c))
248#define ACPI_STRLEN(s) (acpi_size) strlen((s)) 243#define ACPI_STRLEN(s) (acpi_size) strlen((s))
@@ -274,12 +269,12 @@
274 * 269 *
275 *****************************************************************************/ 270 *****************************************************************************/
276 271
277 /* 272/*
278 * Use local definitions of C library macros and functions 273 * Use local definitions of C library macros and functions. These function
279 * NOTE: The function implementations may not be as efficient 274 * implementations may not be as efficient as an inline or assembly code
280 * as an inline or assembly code implementation provided by a 275 * implementation provided by a native C library, but they are functionally
281 * native C library. 276 * equivalent.
282 */ 277 */
283 278
284#ifndef va_arg 279#ifndef va_arg
285 280
@@ -288,15 +283,11 @@
288typedef char *va_list; 283typedef char *va_list;
289#endif /* _VALIST */ 284#endif /* _VALIST */
290 285
291/* 286/* Storage alignment properties */
292 * Storage alignment properties
293 */
294#define _AUPBND (sizeof (acpi_native_int) - 1) 287#define _AUPBND (sizeof (acpi_native_int) - 1)
295#define _ADNBND (sizeof (acpi_native_int) - 1) 288#define _ADNBND (sizeof (acpi_native_int) - 1)
296 289
297/* 290/* Variable argument list macro definitions */
298 * Variable argument list macro definitions
299 */
300#define _bnd(X, bnd) (((sizeof (X)) + (bnd)) & (~(bnd))) 291#define _bnd(X, bnd) (((sizeof (X)) + (bnd)) & (~(bnd)))
301#define va_arg(ap, T) (*(T *)(((ap) += (_bnd (T, _AUPBND))) - (_bnd (T,_ADNBND)))) 292#define va_arg(ap, T) (*(T *)(((ap) += (_bnd (T, _AUPBND))) - (_bnd (T,_ADNBND))))
302#define va_end(ap) (void) 0 293#define va_end(ap) (void) 0
@@ -304,6 +295,7 @@ typedef char *va_list;
304 295
305#endif /* va_arg */ 296#endif /* va_arg */
306 297
298/* Use the local (ACPICA) definitions of the clib functions */
307#define ACPI_STRSTR(s1,s2) acpi_ut_strstr ((s1), (s2)) 299#define ACPI_STRSTR(s1,s2) acpi_ut_strstr ((s1), (s2))
308#define ACPI_STRCHR(s1,c) acpi_ut_strchr ((s1), (c)) 300#define ACPI_STRCHR(s1,c) acpi_ut_strchr ((s1), (c))
309#define ACPI_STRLEN(s) (acpi_size) acpi_ut_strlen ((s)) 301#define ACPI_STRLEN(s) (acpi_size) acpi_ut_strlen ((s))