diff options
author | Bob Moore <robert.moore@intel.com> | 2006-10-03 00:00:00 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-04-01 01:26:39 -0500 |
commit | 8313524a0d466f451a62709aaedf988d8257b21c (patch) | |
tree | d612fc796ae07d8a39542c95eec0f5169c9f64eb /drivers/acpi/utilities | |
parent | ea936b78f46cbe089a4ac363e1682dee7d427096 (diff) |
ACPI: ACPICA 20060310
Tagged all external interfaces to the subsystem with the
new ACPI_EXPORT_SYMBOL macro. This macro can be defined
as necessary to assist kernel integration. For Linux,
the macro resolves to the EXPORT_SYMBOL macro. The default
definition is NULL.
Added the ACPI_THREAD_ID type for the return value from
acpi_os_get_thread_id(). This allows the host to define this
as necessary to simplify kernel integration. The default
definition is ACPI_NATIVE_UINT.
Valery Podrezov fixed two interpreter problems related
to error processing, the deletion of objects, and placing
invalid pointers onto the internal operator result stack.
http://bugzilla.kernel.org/show_bug.cgi?id=6028
http://bugzilla.kernel.org/show_bug.cgi?id=6151
Increased the reference count threshold where a warning is
emitted for large reference counts in order to eliminate
unnecessary warnings on systems with large namespaces
(especially 64-bit.) Increased the value from 0x400
to 0x800.
Due to universal disagreement as to the meaning of the
'c' in the calloc() function, the ACPI_MEM_CALLOCATE
macro has been renamed to ACPI_ALLOCATE_ZEROED so that the
purpose of the interface is 'clear'. ACPI_MEM_ALLOCATE and
ACPI_MEM_FREE are renamed to ACPI_ALLOCATE and ACPI_FREE.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/utilities')
-rw-r--r-- | drivers/acpi/utilities/utalloc.c | 2 | ||||
-rw-r--r-- | drivers/acpi/utilities/utcache.c | 8 | ||||
-rw-r--r-- | drivers/acpi/utilities/utcopy.c | 24 | ||||
-rw-r--r-- | drivers/acpi/utilities/utdebug.c | 23 | ||||
-rw-r--r-- | drivers/acpi/utilities/utdelete.c | 4 | ||||
-rw-r--r-- | drivers/acpi/utilities/uteval.c | 4 | ||||
-rw-r--r-- | drivers/acpi/utilities/utglobal.c | 6 | ||||
-rw-r--r-- | drivers/acpi/utilities/utinit.c | 8 | ||||
-rw-r--r-- | drivers/acpi/utilities/utmisc.c | 2 | ||||
-rw-r--r-- | drivers/acpi/utilities/utmutex.c | 4 | ||||
-rw-r--r-- | drivers/acpi/utilities/utobject.c | 5 | ||||
-rw-r--r-- | drivers/acpi/utilities/utxface.c | 24 |
12 files changed, 54 insertions, 60 deletions
diff --git a/drivers/acpi/utilities/utalloc.c b/drivers/acpi/utilities/utalloc.c index 34de3791d4c2..7b35eb84d058 100644 --- a/drivers/acpi/utilities/utalloc.c +++ b/drivers/acpi/utilities/utalloc.c | |||
@@ -252,7 +252,7 @@ acpi_ut_initialize_buffer(struct acpi_buffer * buffer, | |||
252 | 252 | ||
253 | /* Allocate a new buffer with local interface to allow tracking */ | 253 | /* Allocate a new buffer with local interface to allow tracking */ |
254 | 254 | ||
255 | buffer->pointer = ACPI_MEM_CALLOCATE(required_length); | 255 | buffer->pointer = ACPI_ALLOCATE_ZEROED(required_length); |
256 | if (!buffer->pointer) { | 256 | if (!buffer->pointer) { |
257 | return (AE_NO_MEMORY); | 257 | return (AE_NO_MEMORY); |
258 | } | 258 | } |
diff --git a/drivers/acpi/utilities/utcache.c b/drivers/acpi/utilities/utcache.c index 044c890e5b3c..5d2f4b2802a5 100644 --- a/drivers/acpi/utilities/utcache.c +++ b/drivers/acpi/utilities/utcache.c | |||
@@ -125,7 +125,7 @@ acpi_status acpi_os_purge_cache(struct acpi_memory_list * cache) | |||
125 | &(((char *)cache-> | 125 | &(((char *)cache-> |
126 | list_head)[cache-> | 126 | list_head)[cache-> |
127 | link_offset]))); | 127 | link_offset]))); |
128 | ACPI_MEM_FREE(cache->list_head); | 128 | ACPI_FREE(cache->list_head); |
129 | 129 | ||
130 | cache->list_head = next; | 130 | cache->list_head = next; |
131 | cache->current_depth--; | 131 | cache->current_depth--; |
@@ -194,7 +194,7 @@ acpi_os_release_object(struct acpi_memory_list * cache, void *object) | |||
194 | /* If cache is full, just free this object */ | 194 | /* If cache is full, just free this object */ |
195 | 195 | ||
196 | if (cache->current_depth >= cache->max_depth) { | 196 | if (cache->current_depth >= cache->max_depth) { |
197 | ACPI_MEM_FREE(object); | 197 | ACPI_FREE(object); |
198 | ACPI_MEM_TRACKING(cache->total_freed++); | 198 | ACPI_MEM_TRACKING(cache->total_freed++); |
199 | } | 199 | } |
200 | 200 | ||
@@ -289,14 +289,14 @@ void *acpi_os_acquire_object(struct acpi_memory_list *cache) | |||
289 | 289 | ||
290 | ACPI_MEM_TRACKING(cache->total_allocated++); | 290 | ACPI_MEM_TRACKING(cache->total_allocated++); |
291 | 291 | ||
292 | /* Avoid deadlock with ACPI_MEM_CALLOCATE */ | 292 | /* Avoid deadlock with ACPI_ALLOCATE_ZEROED */ |
293 | 293 | ||
294 | status = acpi_ut_release_mutex(ACPI_MTX_CACHES); | 294 | status = acpi_ut_release_mutex(ACPI_MTX_CACHES); |
295 | if (ACPI_FAILURE(status)) { | 295 | if (ACPI_FAILURE(status)) { |
296 | return (NULL); | 296 | return (NULL); |
297 | } | 297 | } |
298 | 298 | ||
299 | object = ACPI_MEM_CALLOCATE(cache->object_size); | 299 | object = ACPI_ALLOCATE_ZEROED(cache->object_size); |
300 | if (!object) { | 300 | if (!object) { |
301 | return (NULL); | 301 | return (NULL); |
302 | } | 302 | } |
diff --git a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c index 47875935c3f4..371cddc0d574 100644 --- a/drivers/acpi/utilities/utcopy.c +++ b/drivers/acpi/utilities/utcopy.c | |||
@@ -472,8 +472,8 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object, | |||
472 | case ACPI_TYPE_STRING: | 472 | case ACPI_TYPE_STRING: |
473 | 473 | ||
474 | internal_object->string.pointer = | 474 | internal_object->string.pointer = |
475 | ACPI_MEM_CALLOCATE((acpi_size) external_object->string. | 475 | ACPI_ALLOCATE_ZEROED((acpi_size) external_object->string. |
476 | length + 1); | 476 | length + 1); |
477 | if (!internal_object->string.pointer) { | 477 | if (!internal_object->string.pointer) { |
478 | goto error_exit; | 478 | goto error_exit; |
479 | } | 479 | } |
@@ -488,7 +488,7 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object, | |||
488 | case ACPI_TYPE_BUFFER: | 488 | case ACPI_TYPE_BUFFER: |
489 | 489 | ||
490 | internal_object->buffer.pointer = | 490 | internal_object->buffer.pointer = |
491 | ACPI_MEM_CALLOCATE(external_object->buffer.length); | 491 | ACPI_ALLOCATE_ZEROED(external_object->buffer.length); |
492 | if (!internal_object->buffer.pointer) { | 492 | if (!internal_object->buffer.pointer) { |
493 | goto error_exit; | 493 | goto error_exit; |
494 | } | 494 | } |
@@ -676,7 +676,7 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, | |||
676 | if ((source_desc->buffer.pointer) && | 676 | if ((source_desc->buffer.pointer) && |
677 | (source_desc->buffer.length)) { | 677 | (source_desc->buffer.length)) { |
678 | dest_desc->buffer.pointer = | 678 | dest_desc->buffer.pointer = |
679 | ACPI_MEM_ALLOCATE(source_desc->buffer.length); | 679 | ACPI_ALLOCATE(source_desc->buffer.length); |
680 | if (!dest_desc->buffer.pointer) { | 680 | if (!dest_desc->buffer.pointer) { |
681 | return (AE_NO_MEMORY); | 681 | return (AE_NO_MEMORY); |
682 | } | 682 | } |
@@ -697,8 +697,8 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, | |||
697 | */ | 697 | */ |
698 | if (source_desc->string.pointer) { | 698 | if (source_desc->string.pointer) { |
699 | dest_desc->string.pointer = | 699 | dest_desc->string.pointer = |
700 | ACPI_MEM_ALLOCATE((acpi_size) source_desc->string. | 700 | ACPI_ALLOCATE((acpi_size) source_desc->string. |
701 | length + 1); | 701 | length + 1); |
702 | if (!dest_desc->string.pointer) { | 702 | if (!dest_desc->string.pointer) { |
703 | return (AE_NO_MEMORY); | 703 | return (AE_NO_MEMORY); |
704 | } | 704 | } |
@@ -805,9 +805,7 @@ acpi_ut_copy_ielement_to_ielement(u8 object_type, | |||
805 | /* | 805 | /* |
806 | * Create the object array | 806 | * Create the object array |
807 | */ | 807 | */ |
808 | target_object->package.elements = | 808 | target_object->package.elements = ACPI_ALLOCATE_ZEROED(((acpi_size) source_object->package.count + 1) * sizeof(void *)); |
809 | ACPI_MEM_CALLOCATE(((acpi_size) source_object->package. | ||
810 | count + 1) * sizeof(void *)); | ||
811 | if (!target_object->package.elements) { | 809 | if (!target_object->package.elements) { |
812 | status = AE_NO_MEMORY; | 810 | status = AE_NO_MEMORY; |
813 | goto error_exit; | 811 | goto error_exit; |
@@ -865,10 +863,10 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj, | |||
865 | /* | 863 | /* |
866 | * Create the object array and walk the source package tree | 864 | * Create the object array and walk the source package tree |
867 | */ | 865 | */ |
868 | dest_obj->package.elements = ACPI_MEM_CALLOCATE(((acpi_size) | 866 | dest_obj->package.elements = ACPI_ALLOCATE_ZEROED(((acpi_size) |
869 | source_obj->package. | 867 | source_obj->package. |
870 | count + | 868 | count + |
871 | 1) * sizeof(void *)); | 869 | 1) * sizeof(void *)); |
872 | if (!dest_obj->package.elements) { | 870 | if (!dest_obj->package.elements) { |
873 | ACPI_ERROR((AE_INFO, "Package allocation failure")); | 871 | ACPI_ERROR((AE_INFO, "Package allocation failure")); |
874 | return_ACPI_STATUS(AE_NO_MEMORY); | 872 | return_ACPI_STATUS(AE_NO_MEMORY); |
diff --git a/drivers/acpi/utilities/utdebug.c b/drivers/acpi/utilities/utdebug.c index 6e92b2a3c0fd..a8c350643d57 100644 --- a/drivers/acpi/utilities/utdebug.c +++ b/drivers/acpi/utilities/utdebug.c | |||
@@ -41,8 +41,6 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include <linux/module.h> | ||
45 | |||
46 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
47 | 45 | ||
48 | #define _COMPONENT ACPI_UTILITIES | 46 | #define _COMPONENT ACPI_UTILITIES |
@@ -164,7 +162,7 @@ acpi_ut_debug_print(u32 requested_debug_level, | |||
164 | const char *function_name, | 162 | const char *function_name, |
165 | char *module_name, u32 component_id, char *format, ...) | 163 | char *module_name, u32 component_id, char *format, ...) |
166 | { | 164 | { |
167 | u32 thread_id; | 165 | acpi_thread_id thread_id; |
168 | va_list args; | 166 | va_list args; |
169 | 167 | ||
170 | /* | 168 | /* |
@@ -179,7 +177,6 @@ acpi_ut_debug_print(u32 requested_debug_level, | |||
179 | * Thread tracking and context switch notification | 177 | * Thread tracking and context switch notification |
180 | */ | 178 | */ |
181 | thread_id = acpi_os_get_thread_id(); | 179 | thread_id = acpi_os_get_thread_id(); |
182 | |||
183 | if (thread_id != acpi_gbl_prev_thread_id) { | 180 | if (thread_id != acpi_gbl_prev_thread_id) { |
184 | if (ACPI_LV_THREADS & acpi_dbg_level) { | 181 | if (ACPI_LV_THREADS & acpi_dbg_level) { |
185 | acpi_os_printf | 182 | acpi_os_printf |
@@ -208,7 +205,7 @@ acpi_ut_debug_print(u32 requested_debug_level, | |||
208 | acpi_os_vprintf(format, args); | 205 | acpi_os_vprintf(format, args); |
209 | } | 206 | } |
210 | 207 | ||
211 | EXPORT_SYMBOL(acpi_ut_debug_print); | 208 | ACPI_EXPORT_SYMBOL(acpi_ut_debug_print) |
212 | 209 | ||
213 | /******************************************************************************* | 210 | /******************************************************************************* |
214 | * | 211 | * |
@@ -228,7 +225,6 @@ EXPORT_SYMBOL(acpi_ut_debug_print); | |||
228 | * debug_print so that the same macros can be used. | 225 | * debug_print so that the same macros can be used. |
229 | * | 226 | * |
230 | ******************************************************************************/ | 227 | ******************************************************************************/ |
231 | |||
232 | void ACPI_INTERNAL_VAR_XFACE | 228 | void ACPI_INTERNAL_VAR_XFACE |
233 | acpi_ut_debug_print_raw(u32 requested_debug_level, | 229 | acpi_ut_debug_print_raw(u32 requested_debug_level, |
234 | u32 line_number, | 230 | u32 line_number, |
@@ -246,7 +242,7 @@ acpi_ut_debug_print_raw(u32 requested_debug_level, | |||
246 | acpi_os_vprintf(format, args); | 242 | acpi_os_vprintf(format, args); |
247 | } | 243 | } |
248 | 244 | ||
249 | EXPORT_SYMBOL(acpi_ut_debug_print_raw); | 245 | ACPI_EXPORT_SYMBOL(acpi_ut_debug_print_raw) |
250 | 246 | ||
251 | /******************************************************************************* | 247 | /******************************************************************************* |
252 | * | 248 | * |
@@ -263,7 +259,6 @@ EXPORT_SYMBOL(acpi_ut_debug_print_raw); | |||
263 | * set in debug_level | 259 | * set in debug_level |
264 | * | 260 | * |
265 | ******************************************************************************/ | 261 | ******************************************************************************/ |
266 | |||
267 | void | 262 | void |
268 | acpi_ut_trace(u32 line_number, | 263 | acpi_ut_trace(u32 line_number, |
269 | const char *function_name, char *module_name, u32 component_id) | 264 | const char *function_name, char *module_name, u32 component_id) |
@@ -277,7 +272,7 @@ acpi_ut_trace(u32 line_number, | |||
277 | component_id, "%s\n", acpi_gbl_fn_entry_str); | 272 | component_id, "%s\n", acpi_gbl_fn_entry_str); |
278 | } | 273 | } |
279 | 274 | ||
280 | EXPORT_SYMBOL(acpi_ut_trace); | 275 | ACPI_EXPORT_SYMBOL(acpi_ut_trace) |
281 | 276 | ||
282 | /******************************************************************************* | 277 | /******************************************************************************* |
283 | * | 278 | * |
@@ -295,7 +290,6 @@ EXPORT_SYMBOL(acpi_ut_trace); | |||
295 | * set in debug_level | 290 | * set in debug_level |
296 | * | 291 | * |
297 | ******************************************************************************/ | 292 | ******************************************************************************/ |
298 | |||
299 | void | 293 | void |
300 | acpi_ut_trace_ptr(u32 line_number, | 294 | acpi_ut_trace_ptr(u32 line_number, |
301 | const char *function_name, | 295 | const char *function_name, |
@@ -402,7 +396,7 @@ acpi_ut_exit(u32 line_number, | |||
402 | acpi_gbl_nesting_level--; | 396 | acpi_gbl_nesting_level--; |
403 | } | 397 | } |
404 | 398 | ||
405 | EXPORT_SYMBOL(acpi_ut_exit); | 399 | ACPI_EXPORT_SYMBOL(acpi_ut_exit) |
406 | 400 | ||
407 | /******************************************************************************* | 401 | /******************************************************************************* |
408 | * | 402 | * |
@@ -420,7 +414,6 @@ EXPORT_SYMBOL(acpi_ut_exit); | |||
420 | * set in debug_level. Prints exit status also. | 414 | * set in debug_level. Prints exit status also. |
421 | * | 415 | * |
422 | ******************************************************************************/ | 416 | ******************************************************************************/ |
423 | |||
424 | void | 417 | void |
425 | acpi_ut_status_exit(u32 line_number, | 418 | acpi_ut_status_exit(u32 line_number, |
426 | const char *function_name, | 419 | const char *function_name, |
@@ -444,7 +437,7 @@ acpi_ut_status_exit(u32 line_number, | |||
444 | acpi_gbl_nesting_level--; | 437 | acpi_gbl_nesting_level--; |
445 | } | 438 | } |
446 | 439 | ||
447 | EXPORT_SYMBOL(acpi_ut_status_exit); | 440 | ACPI_EXPORT_SYMBOL(acpi_ut_status_exit) |
448 | 441 | ||
449 | /******************************************************************************* | 442 | /******************************************************************************* |
450 | * | 443 | * |
@@ -462,7 +455,6 @@ EXPORT_SYMBOL(acpi_ut_status_exit); | |||
462 | * set in debug_level. Prints exit value also. | 455 | * set in debug_level. Prints exit value also. |
463 | * | 456 | * |
464 | ******************************************************************************/ | 457 | ******************************************************************************/ |
465 | |||
466 | void | 458 | void |
467 | acpi_ut_value_exit(u32 line_number, | 459 | acpi_ut_value_exit(u32 line_number, |
468 | const char *function_name, | 460 | const char *function_name, |
@@ -477,7 +469,7 @@ acpi_ut_value_exit(u32 line_number, | |||
477 | acpi_gbl_nesting_level--; | 469 | acpi_gbl_nesting_level--; |
478 | } | 470 | } |
479 | 471 | ||
480 | EXPORT_SYMBOL(acpi_ut_value_exit); | 472 | ACPI_EXPORT_SYMBOL(acpi_ut_value_exit) |
481 | 473 | ||
482 | /******************************************************************************* | 474 | /******************************************************************************* |
483 | * | 475 | * |
@@ -495,7 +487,6 @@ EXPORT_SYMBOL(acpi_ut_value_exit); | |||
495 | * set in debug_level. Prints exit value also. | 487 | * set in debug_level. Prints exit value also. |
496 | * | 488 | * |
497 | ******************************************************************************/ | 489 | ******************************************************************************/ |
498 | |||
499 | void | 490 | void |
500 | acpi_ut_ptr_exit(u32 line_number, | 491 | acpi_ut_ptr_exit(u32 line_number, |
501 | const char *function_name, | 492 | const char *function_name, |
diff --git a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c index dbae72121cea..9c6867fcf009 100644 --- a/drivers/acpi/utilities/utdelete.c +++ b/drivers/acpi/utilities/utdelete.c | |||
@@ -236,7 +236,7 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) | |||
236 | if (obj_pointer) { | 236 | if (obj_pointer) { |
237 | ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, | 237 | ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, |
238 | "Deleting Object Subptr %p\n", obj_pointer)); | 238 | "Deleting Object Subptr %p\n", obj_pointer)); |
239 | ACPI_MEM_FREE(obj_pointer); | 239 | ACPI_FREE(obj_pointer); |
240 | } | 240 | } |
241 | 241 | ||
242 | /* Now the object can be safely deleted */ | 242 | /* Now the object can be safely deleted */ |
@@ -275,7 +275,7 @@ void acpi_ut_delete_internal_object_list(union acpi_operand_object **obj_list) | |||
275 | 275 | ||
276 | /* Free the combined parameter pointer list and object array */ | 276 | /* Free the combined parameter pointer list and object array */ |
277 | 277 | ||
278 | ACPI_MEM_FREE(obj_list); | 278 | ACPI_FREE(obj_list); |
279 | return_VOID; | 279 | return_VOID; |
280 | } | 280 | } |
281 | 281 | ||
diff --git a/drivers/acpi/utilities/uteval.c b/drivers/acpi/utilities/uteval.c index 952ffdea93aa..68b9eff4b326 100644 --- a/drivers/acpi/utilities/uteval.c +++ b/drivers/acpi/utilities/uteval.c | |||
@@ -461,7 +461,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node * device_node, | |||
461 | size = (((count - 1) * sizeof(struct acpi_compatible_id)) + | 461 | size = (((count - 1) * sizeof(struct acpi_compatible_id)) + |
462 | sizeof(struct acpi_compatible_id_list)); | 462 | sizeof(struct acpi_compatible_id_list)); |
463 | 463 | ||
464 | cid_list = ACPI_MEM_CALLOCATE((acpi_size) size); | 464 | cid_list = ACPI_ALLOCATE_ZEROED((acpi_size) size); |
465 | if (!cid_list) { | 465 | if (!cid_list) { |
466 | return_ACPI_STATUS(AE_NO_MEMORY); | 466 | return_ACPI_STATUS(AE_NO_MEMORY); |
467 | } | 467 | } |
@@ -502,7 +502,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node * device_node, | |||
502 | /* Cleanup on error */ | 502 | /* Cleanup on error */ |
503 | 503 | ||
504 | if (ACPI_FAILURE(status)) { | 504 | if (ACPI_FAILURE(status)) { |
505 | ACPI_MEM_FREE(cid_list); | 505 | ACPI_FREE(cid_list); |
506 | } else { | 506 | } else { |
507 | *return_cid_list = cid_list; | 507 | *return_cid_list = cid_list; |
508 | } | 508 | } |
diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c index 767c5e44a04b..5bc8da7acc6c 100644 --- a/drivers/acpi/utilities/utglobal.c +++ b/drivers/acpi/utilities/utglobal.c | |||
@@ -43,7 +43,6 @@ | |||
43 | 43 | ||
44 | #define DEFINE_ACPI_GLOBALS | 44 | #define DEFINE_ACPI_GLOBALS |
45 | 45 | ||
46 | #include <linux/module.h> | ||
47 | #include <acpi/acpi.h> | 46 | #include <acpi/acpi.h> |
48 | #include <acpi/acnamesp.h> | 47 | #include <acpi/acnamesp.h> |
49 | 48 | ||
@@ -144,12 +143,10 @@ const char *acpi_format_exception(acpi_status status) | |||
144 | 143 | ||
145 | /* Debug switch - level and trace mask */ | 144 | /* Debug switch - level and trace mask */ |
146 | u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT; | 145 | u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT; |
147 | EXPORT_SYMBOL(acpi_dbg_level); | ||
148 | 146 | ||
149 | /* Debug switch - layer (component) mask */ | 147 | /* Debug switch - layer (component) mask */ |
150 | 148 | ||
151 | u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS; | 149 | u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS; |
152 | EXPORT_SYMBOL(acpi_dbg_layer); | ||
153 | u32 acpi_gbl_nesting_level = 0; | 150 | u32 acpi_gbl_nesting_level = 0; |
154 | 151 | ||
155 | /* Debugger globals */ | 152 | /* Debugger globals */ |
@@ -871,3 +868,6 @@ void acpi_ut_init_globals(void) | |||
871 | 868 | ||
872 | return_VOID; | 869 | return_VOID; |
873 | } | 870 | } |
871 | |||
872 | ACPI_EXPORT_SYMBOL(acpi_dbg_level) | ||
873 | ACPI_EXPORT_SYMBOL(acpi_dbg_layer) | ||
diff --git a/drivers/acpi/utilities/utinit.c b/drivers/acpi/utilities/utinit.c index ba771b4f39bc..40313de6977d 100644 --- a/drivers/acpi/utilities/utinit.c +++ b/drivers/acpi/utilities/utinit.c | |||
@@ -186,14 +186,14 @@ static void acpi_ut_terminate(void) | |||
186 | gpe_block = gpe_xrupt_info->gpe_block_list_head; | 186 | gpe_block = gpe_xrupt_info->gpe_block_list_head; |
187 | while (gpe_block) { | 187 | while (gpe_block) { |
188 | next_gpe_block = gpe_block->next; | 188 | next_gpe_block = gpe_block->next; |
189 | ACPI_MEM_FREE(gpe_block->event_info); | 189 | ACPI_FREE(gpe_block->event_info); |
190 | ACPI_MEM_FREE(gpe_block->register_info); | 190 | ACPI_FREE(gpe_block->register_info); |
191 | ACPI_MEM_FREE(gpe_block); | 191 | ACPI_FREE(gpe_block); |
192 | 192 | ||
193 | gpe_block = next_gpe_block; | 193 | gpe_block = next_gpe_block; |
194 | } | 194 | } |
195 | next_gpe_xrupt_info = gpe_xrupt_info->next; | 195 | next_gpe_xrupt_info = gpe_xrupt_info->next; |
196 | ACPI_MEM_FREE(gpe_xrupt_info); | 196 | ACPI_FREE(gpe_xrupt_info); |
197 | gpe_xrupt_info = next_gpe_xrupt_info; | 197 | gpe_xrupt_info = next_gpe_xrupt_info; |
198 | } | 198 | } |
199 | 199 | ||
diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c index 60f36130663c..77268ba86291 100644 --- a/drivers/acpi/utilities/utmisc.c +++ b/drivers/acpi/utilities/utmisc.c | |||
@@ -463,7 +463,7 @@ acpi_ut_display_init_pathname(u8 type, | |||
463 | } | 463 | } |
464 | acpi_os_printf("\n"); | 464 | acpi_os_printf("\n"); |
465 | 465 | ||
466 | ACPI_MEM_FREE(buffer.pointer); | 466 | ACPI_FREE(buffer.pointer); |
467 | } | 467 | } |
468 | #endif | 468 | #endif |
469 | 469 | ||
diff --git a/drivers/acpi/utilities/utmutex.c b/drivers/acpi/utilities/utmutex.c index 45a7244df924..0ac6700a45f8 100644 --- a/drivers/acpi/utilities/utmutex.c +++ b/drivers/acpi/utilities/utmutex.c | |||
@@ -192,7 +192,7 @@ static acpi_status acpi_ut_delete_mutex(acpi_mutex_handle mutex_id) | |||
192 | acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) | 192 | acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) |
193 | { | 193 | { |
194 | acpi_status status; | 194 | acpi_status status; |
195 | u32 this_thread_id; | 195 | acpi_thread_id this_thread_id; |
196 | 196 | ||
197 | ACPI_FUNCTION_NAME("ut_acquire_mutex"); | 197 | ACPI_FUNCTION_NAME("ut_acquire_mutex"); |
198 | 198 | ||
@@ -275,7 +275,7 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) | |||
275 | acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id) | 275 | acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id) |
276 | { | 276 | { |
277 | acpi_status status; | 277 | acpi_status status; |
278 | u32 this_thread_id; | 278 | acpi_thread_id this_thread_id; |
279 | 279 | ||
280 | ACPI_FUNCTION_NAME("ut_release_mutex"); | 280 | ACPI_FUNCTION_NAME("ut_release_mutex"); |
281 | 281 | ||
diff --git a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c index b1205a58028c..8e3dcbd23f5d 100644 --- a/drivers/acpi/utilities/utobject.c +++ b/drivers/acpi/utilities/utobject.c | |||
@@ -176,7 +176,7 @@ union acpi_operand_object *acpi_ut_create_buffer_object(acpi_size buffer_size) | |||
176 | 176 | ||
177 | /* Allocate the actual buffer */ | 177 | /* Allocate the actual buffer */ |
178 | 178 | ||
179 | buffer = ACPI_MEM_CALLOCATE(buffer_size); | 179 | buffer = ACPI_ALLOCATE_ZEROED(buffer_size); |
180 | if (!buffer) { | 180 | if (!buffer) { |
181 | ACPI_ERROR((AE_INFO, "Could not allocate size %X", | 181 | ACPI_ERROR((AE_INFO, "Could not allocate size %X", |
182 | (u32) buffer_size)); | 182 | (u32) buffer_size)); |
@@ -228,7 +228,7 @@ union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size) | |||
228 | * Allocate the actual string buffer -- (Size + 1) for NULL terminator. | 228 | * Allocate the actual string buffer -- (Size + 1) for NULL terminator. |
229 | * NOTE: Zero-length strings are NULL terminated | 229 | * NOTE: Zero-length strings are NULL terminated |
230 | */ | 230 | */ |
231 | string = ACPI_MEM_CALLOCATE(string_size + 1); | 231 | string = ACPI_ALLOCATE_ZEROED(string_size + 1); |
232 | if (!string) { | 232 | if (!string) { |
233 | ACPI_ERROR((AE_INFO, "Could not allocate size %X", | 233 | ACPI_ERROR((AE_INFO, "Could not allocate size %X", |
234 | (u32) string_size)); | 234 | (u32) string_size)); |
@@ -320,6 +320,7 @@ void *acpi_ut_allocate_object_desc_dbg(char *module_name, | |||
320 | } | 320 | } |
321 | 321 | ||
322 | /* Mark the descriptor type */ | 322 | /* Mark the descriptor type */ |
323 | |||
323 | memset(object, 0, sizeof(union acpi_operand_object)); | 324 | memset(object, 0, sizeof(union acpi_operand_object)); |
324 | ACPI_SET_DESCRIPTOR_TYPE(object, ACPI_DESC_TYPE_OPERAND); | 325 | ACPI_SET_DESCRIPTOR_TYPE(object, ACPI_DESC_TYPE_OPERAND); |
325 | 326 | ||
diff --git a/drivers/acpi/utilities/utxface.c b/drivers/acpi/utilities/utxface.c index 308a960871be..ac90048a8a5b 100644 --- a/drivers/acpi/utilities/utxface.c +++ b/drivers/acpi/utilities/utxface.c | |||
@@ -41,8 +41,6 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include <linux/module.h> | ||
45 | |||
46 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
47 | #include <acpi/acevents.h> | 45 | #include <acpi/acevents.h> |
48 | #include <acpi/acnamesp.h> | 46 | #include <acpi/acnamesp.h> |
@@ -109,6 +107,8 @@ acpi_status acpi_initialize_subsystem(void) | |||
109 | return_ACPI_STATUS(status); | 107 | return_ACPI_STATUS(status); |
110 | } | 108 | } |
111 | 109 | ||
110 | ACPI_EXPORT_SYMBOL(acpi_initialize_subsystem) | ||
111 | |||
112 | /******************************************************************************* | 112 | /******************************************************************************* |
113 | * | 113 | * |
114 | * FUNCTION: acpi_enable_subsystem | 114 | * FUNCTION: acpi_enable_subsystem |
@@ -121,7 +121,6 @@ acpi_status acpi_initialize_subsystem(void) | |||
121 | * Puts system into ACPI mode if it isn't already. | 121 | * Puts system into ACPI mode if it isn't already. |
122 | * | 122 | * |
123 | ******************************************************************************/ | 123 | ******************************************************************************/ |
124 | |||
125 | acpi_status acpi_enable_subsystem(u32 flags) | 124 | acpi_status acpi_enable_subsystem(u32 flags) |
126 | { | 125 | { |
127 | acpi_status status = AE_OK; | 126 | acpi_status status = AE_OK; |
@@ -229,6 +228,8 @@ acpi_status acpi_enable_subsystem(u32 flags) | |||
229 | return_ACPI_STATUS(status); | 228 | return_ACPI_STATUS(status); |
230 | } | 229 | } |
231 | 230 | ||
231 | ACPI_EXPORT_SYMBOL(acpi_enable_subsystem) | ||
232 | |||
232 | /******************************************************************************* | 233 | /******************************************************************************* |
233 | * | 234 | * |
234 | * FUNCTION: acpi_initialize_objects | 235 | * FUNCTION: acpi_initialize_objects |
@@ -241,7 +242,6 @@ acpi_status acpi_enable_subsystem(u32 flags) | |||
241 | * objects and executing AML code for Regions, buffers, etc. | 242 | * objects and executing AML code for Regions, buffers, etc. |
242 | * | 243 | * |
243 | ******************************************************************************/ | 244 | ******************************************************************************/ |
244 | |||
245 | acpi_status acpi_initialize_objects(u32 flags) | 245 | acpi_status acpi_initialize_objects(u32 flags) |
246 | { | 246 | { |
247 | acpi_status status = AE_OK; | 247 | acpi_status status = AE_OK; |
@@ -305,6 +305,8 @@ acpi_status acpi_initialize_objects(u32 flags) | |||
305 | return_ACPI_STATUS(status); | 305 | return_ACPI_STATUS(status); |
306 | } | 306 | } |
307 | 307 | ||
308 | ACPI_EXPORT_SYMBOL(acpi_initialize_objects) | ||
309 | |||
308 | /******************************************************************************* | 310 | /******************************************************************************* |
309 | * | 311 | * |
310 | * FUNCTION: acpi_terminate | 312 | * FUNCTION: acpi_terminate |
@@ -316,7 +318,6 @@ acpi_status acpi_initialize_objects(u32 flags) | |||
316 | * DESCRIPTION: Shutdown the ACPI subsystem. Release all resources. | 318 | * DESCRIPTION: Shutdown the ACPI subsystem. Release all resources. |
317 | * | 319 | * |
318 | ******************************************************************************/ | 320 | ******************************************************************************/ |
319 | |||
320 | acpi_status acpi_terminate(void) | 321 | acpi_status acpi_terminate(void) |
321 | { | 322 | { |
322 | acpi_status status; | 323 | acpi_status status; |
@@ -348,6 +349,8 @@ acpi_status acpi_terminate(void) | |||
348 | return_ACPI_STATUS(status); | 349 | return_ACPI_STATUS(status); |
349 | } | 350 | } |
350 | 351 | ||
352 | ACPI_EXPORT_SYMBOL(acpi_terminate) | ||
353 | |||
351 | #ifdef ACPI_FUTURE_USAGE | 354 | #ifdef ACPI_FUTURE_USAGE |
352 | /******************************************************************************* | 355 | /******************************************************************************* |
353 | * | 356 | * |
@@ -362,7 +365,6 @@ acpi_status acpi_terminate(void) | |||
362 | * initialized successfully. | 365 | * initialized successfully. |
363 | * | 366 | * |
364 | ******************************************************************************/ | 367 | ******************************************************************************/ |
365 | |||
366 | acpi_status acpi_subsystem_status(void) | 368 | acpi_status acpi_subsystem_status(void) |
367 | { | 369 | { |
368 | 370 | ||
@@ -373,6 +375,8 @@ acpi_status acpi_subsystem_status(void) | |||
373 | } | 375 | } |
374 | } | 376 | } |
375 | 377 | ||
378 | ACPI_EXPORT_SYMBOL(acpi_subsystem_status) | ||
379 | |||
376 | /******************************************************************************* | 380 | /******************************************************************************* |
377 | * | 381 | * |
378 | * FUNCTION: acpi_get_system_info | 382 | * FUNCTION: acpi_get_system_info |
@@ -390,7 +394,6 @@ acpi_status acpi_subsystem_status(void) | |||
390 | * and the value of out_buffer is undefined. | 394 | * and the value of out_buffer is undefined. |
391 | * | 395 | * |
392 | ******************************************************************************/ | 396 | ******************************************************************************/ |
393 | |||
394 | acpi_status acpi_get_system_info(struct acpi_buffer * out_buffer) | 397 | acpi_status acpi_get_system_info(struct acpi_buffer * out_buffer) |
395 | { | 398 | { |
396 | struct acpi_system_info *info_ptr; | 399 | struct acpi_system_info *info_ptr; |
@@ -456,7 +459,7 @@ acpi_status acpi_get_system_info(struct acpi_buffer * out_buffer) | |||
456 | return_ACPI_STATUS(AE_OK); | 459 | return_ACPI_STATUS(AE_OK); |
457 | } | 460 | } |
458 | 461 | ||
459 | EXPORT_SYMBOL(acpi_get_system_info); | 462 | ACPI_EXPORT_SYMBOL(acpi_get_system_info) |
460 | 463 | ||
461 | /***************************************************************************** | 464 | /***************************************************************************** |
462 | * | 465 | * |
@@ -472,7 +475,6 @@ EXPORT_SYMBOL(acpi_get_system_info); | |||
472 | * TBD: When a second function is added, must save the Function also. | 475 | * TBD: When a second function is added, must save the Function also. |
473 | * | 476 | * |
474 | ****************************************************************************/ | 477 | ****************************************************************************/ |
475 | |||
476 | acpi_status | 478 | acpi_status |
477 | acpi_install_initialization_handler(acpi_init_handler handler, u32 function) | 479 | acpi_install_initialization_handler(acpi_init_handler handler, u32 function) |
478 | { | 480 | { |
@@ -489,6 +491,7 @@ acpi_install_initialization_handler(acpi_init_handler handler, u32 function) | |||
489 | return AE_OK; | 491 | return AE_OK; |
490 | } | 492 | } |
491 | 493 | ||
494 | ACPI_EXPORT_SYMBOL(acpi_install_initialization_handler) | ||
492 | #endif /* ACPI_FUTURE_USAGE */ | 495 | #endif /* ACPI_FUTURE_USAGE */ |
493 | 496 | ||
494 | /***************************************************************************** | 497 | /***************************************************************************** |
@@ -502,7 +505,6 @@ acpi_install_initialization_handler(acpi_init_handler handler, u32 function) | |||
502 | * DESCRIPTION: Empty all caches (delete the cached objects) | 505 | * DESCRIPTION: Empty all caches (delete the cached objects) |
503 | * | 506 | * |
504 | ****************************************************************************/ | 507 | ****************************************************************************/ |
505 | |||
506 | acpi_status acpi_purge_cached_objects(void) | 508 | acpi_status acpi_purge_cached_objects(void) |
507 | { | 509 | { |
508 | ACPI_FUNCTION_TRACE("acpi_purge_cached_objects"); | 510 | ACPI_FUNCTION_TRACE("acpi_purge_cached_objects"); |
@@ -513,3 +515,5 @@ acpi_status acpi_purge_cached_objects(void) | |||
513 | (void)acpi_os_purge_cache(acpi_gbl_ps_node_ext_cache); | 515 | (void)acpi_os_purge_cache(acpi_gbl_ps_node_ext_cache); |
514 | return_ACPI_STATUS(AE_OK); | 516 | return_ACPI_STATUS(AE_OK); |
515 | } | 517 | } |
518 | |||
519 | ACPI_EXPORT_SYMBOL(acpi_purge_cached_objects) | ||