aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer/excreate.c
diff options
context:
space:
mode:
authorRobert Moore <robert.moore@intel.com>2005-04-18 22:49:35 -0400
committerLen Brown <len.brown@intel.com>2005-07-12 00:08:52 -0400
commit44f6c01242da4e162f28d8e1216a8c7a91174605 (patch)
tree53f724764f1bd9036dfb049a643d198125cc9edc /drivers/acpi/executer/excreate.c
parentebb6e1a6122fd6b7c96470cfd4ce0f04150e5084 (diff)
ACPICA 20050408 from Bob Moore
Fixed three cases in the interpreter where an "index" argument to an ASL function was still (internally) 32 bits instead of the required 64 bits. This was the Index argument to the Index, Mid, and Match operators. The "strupr" function is now permanently local (acpi_ut_strupr), since this is not a POSIX-defined function and not present in most kernel-level C libraries. References to the C library strupr function have been removed from the headers. Completed the deployment of static functions/prototypes. All prototypes with the static attribute have been moved from the headers to the owning C file. ACPICA 20050329 from Bob Moore An error is now generated if an attempt is made to create a Buffer Field of length zero (A CreateField with a length operand of zero.) The interpreter now issues a warning whenever executable code at the module level is detected during ACPI table load. This will give some idea of the prevalence of this type of code. Implemented support for references to named objects (other than control methods) within package objects. Enhanced package object output for the debug object. Package objects are now completely dumped, showing all elements. Enhanced miscellaneous object output for the debug object. Any object can now be written to the debug object (for example, a device object can be written, and the type of the object will be displayed.) The "static" qualifier has been added to all local functions across the core subsystem. The number of "long" lines (> 80 chars) within the source has been significantly reduced, by about 1/3. Cleaned up all header files to ensure that all CA/iASL functions are prototyped (even static functions) and the formatting is consistent. Two new header files have been added, acopcode.h and acnames.h. Removed several obsolete functions that were no longer used. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/executer/excreate.c')
-rw-r--r--drivers/acpi/executer/excreate.c50
1 files changed, 24 insertions, 26 deletions
diff --git a/drivers/acpi/executer/excreate.c b/drivers/acpi/executer/excreate.c
index d94c260dac6d..812cdcb2e370 100644
--- a/drivers/acpi/executer/excreate.c
+++ b/drivers/acpi/executer/excreate.c
@@ -55,7 +55,7 @@
55 55
56 56
57#ifndef ACPI_NO_METHOD_EXECUTION 57#ifndef ACPI_NO_METHOD_EXECUTION
58/***************************************************************************** 58/*******************************************************************************
59 * 59 *
60 * FUNCTION: acpi_ex_create_alias 60 * FUNCTION: acpi_ex_create_alias
61 * 61 *
@@ -65,7 +65,7 @@
65 * 65 *
66 * DESCRIPTION: Create a new named alias 66 * DESCRIPTION: Create a new named alias
67 * 67 *
68 ****************************************************************************/ 68 ******************************************************************************/
69 69
70acpi_status 70acpi_status
71acpi_ex_create_alias ( 71acpi_ex_create_alias (
@@ -140,8 +140,7 @@ acpi_ex_create_alias (
140 * target node or the alias Node 140 * target node or the alias Node
141 */ 141 */
142 status = acpi_ns_attach_object (alias_node, 142 status = acpi_ns_attach_object (alias_node,
143 acpi_ns_get_attached_object (target_node), 143 acpi_ns_get_attached_object (target_node), target_node->type);
144 target_node->type);
145 break; 144 break;
146 } 145 }
147 146
@@ -151,7 +150,7 @@ acpi_ex_create_alias (
151} 150}
152 151
153 152
154/***************************************************************************** 153/*******************************************************************************
155 * 154 *
156 * FUNCTION: acpi_ex_create_event 155 * FUNCTION: acpi_ex_create_event
157 * 156 *
@@ -161,7 +160,7 @@ acpi_ex_create_alias (
161 * 160 *
162 * DESCRIPTION: Create a new event object 161 * DESCRIPTION: Create a new event object
163 * 162 *
164 ****************************************************************************/ 163 ******************************************************************************/
165 164
166acpi_status 165acpi_status
167acpi_ex_create_event ( 166acpi_ex_create_event (
@@ -185,7 +184,7 @@ acpi_ex_create_event (
185 * that the event is created in an unsignalled state 184 * that the event is created in an unsignalled state
186 */ 185 */
187 status = acpi_os_create_semaphore (ACPI_NO_UNIT_LIMIT, 0, 186 status = acpi_os_create_semaphore (ACPI_NO_UNIT_LIMIT, 0,
188 &obj_desc->event.semaphore); 187 &obj_desc->event.semaphore);
189 if (ACPI_FAILURE (status)) { 188 if (ACPI_FAILURE (status)) {
190 goto cleanup; 189 goto cleanup;
191 } 190 }
@@ -193,7 +192,7 @@ acpi_ex_create_event (
193 /* Attach object to the Node */ 192 /* Attach object to the Node */
194 193
195 status = acpi_ns_attach_object ((struct acpi_namespace_node *) walk_state->operands[0], 194 status = acpi_ns_attach_object ((struct acpi_namespace_node *) walk_state->operands[0],
196 obj_desc, ACPI_TYPE_EVENT); 195 obj_desc, ACPI_TYPE_EVENT);
197 196
198cleanup: 197cleanup:
199 /* 198 /*
@@ -205,7 +204,7 @@ cleanup:
205} 204}
206 205
207 206
208/***************************************************************************** 207/*******************************************************************************
209 * 208 *
210 * FUNCTION: acpi_ex_create_mutex 209 * FUNCTION: acpi_ex_create_mutex
211 * 210 *
@@ -217,7 +216,7 @@ cleanup:
217 * 216 *
218 * Mutex (Name[0], sync_level[1]) 217 * Mutex (Name[0], sync_level[1])
219 * 218 *
220 ****************************************************************************/ 219 ******************************************************************************/
221 220
222acpi_status 221acpi_status
223acpi_ex_create_mutex ( 222acpi_ex_create_mutex (
@@ -267,20 +266,20 @@ cleanup:
267} 266}
268 267
269 268
270/***************************************************************************** 269/*******************************************************************************
271 * 270 *
272 * FUNCTION: acpi_ex_create_region 271 * FUNCTION: acpi_ex_create_region
273 * 272 *
274 * PARAMETERS: aml_start - Pointer to the region declaration AML 273 * PARAMETERS: aml_start - Pointer to the region declaration AML
275 * aml_length - Max length of the declaration AML 274 * aml_length - Max length of the declaration AML
276 * Operands - List of operands for the opcode 275 * region_space - space_iD for the region
277 * walk_state - Current state 276 * walk_state - Current state
278 * 277 *
279 * RETURN: Status 278 * RETURN: Status
280 * 279 *
281 * DESCRIPTION: Create a new operation region object 280 * DESCRIPTION: Create a new operation region object
282 * 281 *
283 ****************************************************************************/ 282 ******************************************************************************/
284 283
285acpi_status 284acpi_status
286acpi_ex_create_region ( 285acpi_ex_create_region (
@@ -321,7 +320,7 @@ acpi_ex_create_region (
321 } 320 }
322 321
323 ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Region Type - %s (%X)\n", 322 ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Region Type - %s (%X)\n",
324 acpi_ut_get_region_name (region_space), region_space)); 323 acpi_ut_get_region_name (region_space), region_space));
325 324
326 /* Create the region descriptor */ 325 /* Create the region descriptor */
327 326
@@ -360,7 +359,7 @@ cleanup:
360} 359}
361 360
362 361
363/***************************************************************************** 362/*******************************************************************************
364 * 363 *
365 * FUNCTION: acpi_ex_create_table_region 364 * FUNCTION: acpi_ex_create_table_region
366 * 365 *
@@ -370,7 +369,7 @@ cleanup:
370 * 369 *
371 * DESCRIPTION: Create a new data_table_region object 370 * DESCRIPTION: Create a new data_table_region object
372 * 371 *
373 ****************************************************************************/ 372 ******************************************************************************/
374 373
375acpi_status 374acpi_status
376acpi_ex_create_table_region ( 375acpi_ex_create_table_region (
@@ -455,7 +454,7 @@ cleanup:
455} 454}
456 455
457 456
458/***************************************************************************** 457/*******************************************************************************
459 * 458 *
460 * FUNCTION: acpi_ex_create_processor 459 * FUNCTION: acpi_ex_create_processor
461 * 460 *
@@ -467,7 +466,7 @@ cleanup:
467 * 466 *
468 * Processor (Name[0], cpu_iD[1], pblock_addr[2], pblock_length[3]) 467 * Processor (Name[0], cpu_iD[1], pblock_addr[2], pblock_length[3])
469 * 468 *
470 ****************************************************************************/ 469 ******************************************************************************/
471 470
472acpi_status 471acpi_status
473acpi_ex_create_processor ( 472acpi_ex_create_processor (
@@ -488,9 +487,8 @@ acpi_ex_create_processor (
488 return_ACPI_STATUS (AE_NO_MEMORY); 487 return_ACPI_STATUS (AE_NO_MEMORY);
489 } 488 }
490 489
491 /* 490 /* Initialize the processor object from the operands */
492 * Initialize the processor object from the operands 491
493 */
494 obj_desc->processor.proc_id = (u8) operand[1]->integer.value; 492 obj_desc->processor.proc_id = (u8) operand[1]->integer.value;
495 obj_desc->processor.address = (acpi_io_address) operand[2]->integer.value; 493 obj_desc->processor.address = (acpi_io_address) operand[2]->integer.value;
496 obj_desc->processor.length = (u8) operand[3]->integer.value; 494 obj_desc->processor.length = (u8) operand[3]->integer.value;
@@ -507,7 +505,7 @@ acpi_ex_create_processor (
507} 505}
508 506
509 507
510/***************************************************************************** 508/*******************************************************************************
511 * 509 *
512 * FUNCTION: acpi_ex_create_power_resource 510 * FUNCTION: acpi_ex_create_power_resource
513 * 511 *
@@ -519,7 +517,7 @@ acpi_ex_create_processor (
519 * 517 *
520 * power_resource (Name[0], system_level[1], resource_order[2]) 518 * power_resource (Name[0], system_level[1], resource_order[2])
521 * 519 *
522 ****************************************************************************/ 520 ******************************************************************************/
523 521
524acpi_status 522acpi_status
525acpi_ex_create_power_resource ( 523acpi_ex_create_power_resource (
@@ -555,10 +553,10 @@ acpi_ex_create_power_resource (
555 acpi_ut_remove_reference (obj_desc); 553 acpi_ut_remove_reference (obj_desc);
556 return_ACPI_STATUS (status); 554 return_ACPI_STATUS (status);
557} 555}
558
559#endif 556#endif
560 557
561/***************************************************************************** 558
559/*******************************************************************************
562 * 560 *
563 * FUNCTION: acpi_ex_create_method 561 * FUNCTION: acpi_ex_create_method
564 * 562 *
@@ -570,7 +568,7 @@ acpi_ex_create_power_resource (
570 * 568 *
571 * DESCRIPTION: Create a new method object 569 * DESCRIPTION: Create a new method object
572 * 570 *
573 ****************************************************************************/ 571 ******************************************************************************/
574 572
575acpi_status 573acpi_status
576acpi_ex_create_method ( 574acpi_ex_create_method (