aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer/exutils.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/exutils.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/exutils.c')
-rw-r--r--drivers/acpi/executer/exutils.c37
1 files changed, 29 insertions, 8 deletions
diff --git a/drivers/acpi/executer/exutils.c b/drivers/acpi/executer/exutils.c
index 40c6abb8b49a..5c7ec0c04177 100644
--- a/drivers/acpi/executer/exutils.c
+++ b/drivers/acpi/executer/exutils.c
@@ -67,22 +67,31 @@
67#define _COMPONENT ACPI_EXECUTER 67#define _COMPONENT ACPI_EXECUTER
68 ACPI_MODULE_NAME ("exutils") 68 ACPI_MODULE_NAME ("exutils")
69 69
70/* Local prototypes */
70 71
71#ifndef ACPI_NO_METHOD_EXECUTION 72static u32
73acpi_ex_digits_needed (
74 acpi_integer value,
75 u32 base);
72 76
77
78#ifndef ACPI_NO_METHOD_EXECUTION
73/******************************************************************************* 79/*******************************************************************************
74 * 80 *
75 * FUNCTION: acpi_ex_enter_interpreter 81 * FUNCTION: acpi_ex_enter_interpreter
76 * 82 *
77 * PARAMETERS: None 83 * PARAMETERS: None
78 * 84 *
85 * RETURN: Status
86 *
79 * DESCRIPTION: Enter the interpreter execution region. Failure to enter 87 * DESCRIPTION: Enter the interpreter execution region. Failure to enter
80 * the interpreter region is a fatal system error 88 * the interpreter region is a fatal system error
81 * 89 *
82 ******************************************************************************/ 90 ******************************************************************************/
83 91
84acpi_status 92acpi_status
85acpi_ex_enter_interpreter (void) 93acpi_ex_enter_interpreter (
94 void)
86{ 95{
87 acpi_status status; 96 acpi_status status;
88 97
@@ -104,6 +113,8 @@ acpi_ex_enter_interpreter (void)
104 * 113 *
105 * PARAMETERS: None 114 * PARAMETERS: None
106 * 115 *
116 * RETURN: None
117 *
107 * DESCRIPTION: Exit the interpreter execution region 118 * DESCRIPTION: Exit the interpreter execution region
108 * 119 *
109 * Cases where the interpreter is unlocked: 120 * Cases where the interpreter is unlocked:
@@ -119,7 +130,8 @@ acpi_ex_enter_interpreter (void)
119 ******************************************************************************/ 130 ******************************************************************************/
120 131
121void 132void
122acpi_ex_exit_interpreter (void) 133acpi_ex_exit_interpreter (
134 void)
123{ 135{
124 acpi_status status; 136 acpi_status status;
125 137
@@ -212,7 +224,8 @@ acpi_ex_acquire_global_lock (
212 locked = TRUE; 224 locked = TRUE;
213 } 225 }
214 else { 226 else {
215 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not acquire Global Lock, %s\n", 227 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
228 "Could not acquire Global Lock, %s\n",
216 acpi_format_exception (status))); 229 acpi_format_exception (status)));
217 } 230 }
218 } 231 }
@@ -228,7 +241,7 @@ acpi_ex_acquire_global_lock (
228 * PARAMETERS: locked_by_me - Return value from corresponding call to 241 * PARAMETERS: locked_by_me - Return value from corresponding call to
229 * acquire_global_lock. 242 * acquire_global_lock.
230 * 243 *
231 * RETURN: Status 244 * RETURN: None
232 * 245 *
233 * DESCRIPTION: Release the global lock if it is locked. 246 * DESCRIPTION: Release the global lock if it is locked.
234 * 247 *
@@ -269,11 +282,14 @@ acpi_ex_release_global_lock (
269 * PARAMETERS: Value - Value to be represented 282 * PARAMETERS: Value - Value to be represented
270 * Base - Base of representation 283 * Base - Base of representation
271 * 284 *
272 * RETURN: the number of digits needed to represent Value in Base 285 * RETURN: The number of digits.
286 *
287 * DESCRIPTION: Calculate the number of digits needed to represent the Value
288 * in the given Base (Radix)
273 * 289 *
274 ******************************************************************************/ 290 ******************************************************************************/
275 291
276u32 292static u32
277acpi_ex_digits_needed ( 293acpi_ex_digits_needed (
278 acpi_integer value, 294 acpi_integer value,
279 u32 base) 295 u32 base)
@@ -312,6 +328,8 @@ acpi_ex_digits_needed (
312 * PARAMETERS: numeric_id - EISA ID to be converted 328 * PARAMETERS: numeric_id - EISA ID to be converted
313 * out_string - Where to put the converted string (8 bytes) 329 * out_string - Where to put the converted string (8 bytes)
314 * 330 *
331 * RETURN: None
332 *
315 * DESCRIPTION: Convert a numeric EISA ID to string representation 333 * DESCRIPTION: Convert a numeric EISA ID to string representation
316 * 334 *
317 ******************************************************************************/ 335 ******************************************************************************/
@@ -349,7 +367,10 @@ acpi_ex_eisa_id_to_string (
349 * PARAMETERS: Value - Value to be converted 367 * PARAMETERS: Value - Value to be converted
350 * out_string - Where to put the converted string (8 bytes) 368 * out_string - Where to put the converted string (8 bytes)
351 * 369 *
352 * RETURN: Convert a number to string representation 370 * RETURN: None, string
371 *
372 * DESCRIPTOIN: Convert a number to string representation. Assumes string
373 * buffer is large enough to hold the string.
353 * 374 *
354 ******************************************************************************/ 375 ******************************************************************************/
355 376