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/tables | |
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/tables')
-rw-r--r-- | drivers/acpi/tables/tbconvrt.c | 8 | ||||
-rw-r--r-- | drivers/acpi/tables/tbget.c | 2 | ||||
-rw-r--r-- | drivers/acpi/tables/tbinstal.c | 8 | ||||
-rw-r--r-- | drivers/acpi/tables/tbxface.c | 15 | ||||
-rw-r--r-- | drivers/acpi/tables/tbxfroot.c | 22 |
5 files changed, 25 insertions, 30 deletions
diff --git a/drivers/acpi/tables/tbconvrt.c b/drivers/acpi/tables/tbconvrt.c index 254ebdbb7bef..5155b27cf032 100644 --- a/drivers/acpi/tables/tbconvrt.c +++ b/drivers/acpi/tables/tbconvrt.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/actables.h> | 45 | #include <acpi/actables.h> |
48 | 46 | ||
@@ -64,7 +62,7 @@ acpi_tb_convert_fadt2(struct fadt_descriptor_rev2 *local_fadt, | |||
64 | struct fadt_descriptor_rev2 *original_fadt); | 62 | struct fadt_descriptor_rev2 *original_fadt); |
65 | 63 | ||
66 | u8 acpi_fadt_is_v1; | 64 | u8 acpi_fadt_is_v1; |
67 | EXPORT_SYMBOL(acpi_fadt_is_v1); | 65 | ACPI_EXPORT_SYMBOL(acpi_fadt_is_v1) |
68 | 66 | ||
69 | /******************************************************************************* | 67 | /******************************************************************************* |
70 | * | 68 | * |
@@ -133,7 +131,7 @@ acpi_status acpi_tb_convert_to_xsdt(struct acpi_table_desc *table_info) | |||
133 | 131 | ||
134 | /* Allocate an XSDT */ | 132 | /* Allocate an XSDT */ |
135 | 133 | ||
136 | new_table = ACPI_MEM_CALLOCATE(table_size); | 134 | new_table = ACPI_ALLOCATE_ZEROED(table_size); |
137 | if (!new_table) { | 135 | if (!new_table) { |
138 | return (AE_NO_MEMORY); | 136 | return (AE_NO_MEMORY); |
139 | } | 137 | } |
@@ -509,7 +507,7 @@ acpi_status acpi_tb_convert_table_fadt(void) | |||
509 | 507 | ||
510 | /* Allocate buffer for the ACPI 2.0(+) FADT */ | 508 | /* Allocate buffer for the ACPI 2.0(+) FADT */ |
511 | 509 | ||
512 | local_fadt = ACPI_MEM_CALLOCATE(sizeof(struct fadt_descriptor_rev2)); | 510 | local_fadt = ACPI_ALLOCATE_ZEROED(sizeof(struct fadt_descriptor_rev2)); |
513 | if (!local_fadt) { | 511 | if (!local_fadt) { |
514 | return_ACPI_STATUS(AE_NO_MEMORY); | 512 | return_ACPI_STATUS(AE_NO_MEMORY); |
515 | } | 513 | } |
diff --git a/drivers/acpi/tables/tbget.c b/drivers/acpi/tables/tbget.c index 4615e1afe8de..b7bd20b9a75e 100644 --- a/drivers/acpi/tables/tbget.c +++ b/drivers/acpi/tables/tbget.c | |||
@@ -330,7 +330,7 @@ acpi_tb_get_this_table(struct acpi_pointer *address, | |||
330 | 330 | ||
331 | /* Pointer matches processor mode, copy the table to a new buffer */ | 331 | /* Pointer matches processor mode, copy the table to a new buffer */ |
332 | 332 | ||
333 | full_table = ACPI_MEM_ALLOCATE(header->length); | 333 | full_table = ACPI_ALLOCATE(header->length); |
334 | if (!full_table) { | 334 | if (!full_table) { |
335 | ACPI_ERROR((AE_INFO, | 335 | ACPI_ERROR((AE_INFO, |
336 | "Could not allocate table memory for [%4.4s] length %X", | 336 | "Could not allocate table memory for [%4.4s] length %X", |
diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c index ec2cb978b7c4..ce57a195577a 100644 --- a/drivers/acpi/tables/tbinstal.c +++ b/drivers/acpi/tables/tbinstal.c | |||
@@ -248,7 +248,7 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type, | |||
248 | 248 | ||
249 | /* Allocate a descriptor for this table */ | 249 | /* Allocate a descriptor for this table */ |
250 | 250 | ||
251 | table_desc = ACPI_MEM_CALLOCATE(sizeof(struct acpi_table_desc)); | 251 | table_desc = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_table_desc)); |
252 | if (!table_desc) { | 252 | if (!table_desc) { |
253 | return_ACPI_STATUS(AE_NO_MEMORY); | 253 | return_ACPI_STATUS(AE_NO_MEMORY); |
254 | } | 254 | } |
@@ -275,7 +275,7 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type, | |||
275 | * at this location, so return an error. | 275 | * at this location, so return an error. |
276 | */ | 276 | */ |
277 | if (list_head->next) { | 277 | if (list_head->next) { |
278 | ACPI_MEM_FREE(table_desc); | 278 | ACPI_FREE(table_desc); |
279 | return_ACPI_STATUS(AE_ALREADY_EXISTS); | 279 | return_ACPI_STATUS(AE_ALREADY_EXISTS); |
280 | } | 280 | } |
281 | 281 | ||
@@ -472,7 +472,7 @@ void acpi_tb_delete_single_table(struct acpi_table_desc *table_desc) | |||
472 | 472 | ||
473 | case ACPI_MEM_ALLOCATED: | 473 | case ACPI_MEM_ALLOCATED: |
474 | 474 | ||
475 | ACPI_MEM_FREE(table_desc->pointer); | 475 | ACPI_FREE(table_desc->pointer); |
476 | break; | 476 | break; |
477 | 477 | ||
478 | case ACPI_MEM_MAPPED: | 478 | case ACPI_MEM_MAPPED: |
@@ -531,7 +531,7 @@ struct acpi_table_desc *acpi_tb_uninstall_table(struct acpi_table_desc | |||
531 | /* Free the table descriptor */ | 531 | /* Free the table descriptor */ |
532 | 532 | ||
533 | next_desc = table_desc->next; | 533 | next_desc = table_desc->next; |
534 | ACPI_MEM_FREE(table_desc); | 534 | ACPI_FREE(table_desc); |
535 | 535 | ||
536 | /* Return pointer to the next descriptor */ | 536 | /* Return pointer to the next descriptor */ |
537 | 537 | ||
diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c index 3e902cdb83e1..53c627e401bf 100644 --- a/drivers/acpi/tables/tbxface.c +++ b/drivers/acpi/tables/tbxface.c | |||
@@ -42,8 +42,6 @@ | |||
42 | * POSSIBILITY OF SUCH DAMAGES. | 42 | * POSSIBILITY OF SUCH DAMAGES. |
43 | */ | 43 | */ |
44 | 44 | ||
45 | #include <linux/module.h> | ||
46 | |||
47 | #include <acpi/acpi.h> | 45 | #include <acpi/acpi.h> |
48 | #include <acpi/acnamesp.h> | 46 | #include <acpi/acnamesp.h> |
49 | #include <acpi/actables.h> | 47 | #include <acpi/actables.h> |
@@ -123,6 +121,8 @@ acpi_status acpi_load_tables(void) | |||
123 | return_ACPI_STATUS(status); | 121 | return_ACPI_STATUS(status); |
124 | } | 122 | } |
125 | 123 | ||
124 | ACPI_EXPORT_SYMBOL(acpi_load_tables) | ||
125 | |||
126 | #ifdef ACPI_FUTURE_USAGE | 126 | #ifdef ACPI_FUTURE_USAGE |
127 | /******************************************************************************* | 127 | /******************************************************************************* |
128 | * | 128 | * |
@@ -139,7 +139,6 @@ acpi_status acpi_load_tables(void) | |||
139 | * is determined that the table is invalid, the call will fail. | 139 | * is determined that the table is invalid, the call will fail. |
140 | * | 140 | * |
141 | ******************************************************************************/ | 141 | ******************************************************************************/ |
142 | |||
143 | acpi_status acpi_load_table(struct acpi_table_header *table_ptr) | 142 | acpi_status acpi_load_table(struct acpi_table_header *table_ptr) |
144 | { | 143 | { |
145 | acpi_status status; | 144 | acpi_status status; |
@@ -218,6 +217,8 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr) | |||
218 | return_ACPI_STATUS(status); | 217 | return_ACPI_STATUS(status); |
219 | } | 218 | } |
220 | 219 | ||
220 | ACPI_EXPORT_SYMBOL(acpi_load_table) | ||
221 | |||
221 | /******************************************************************************* | 222 | /******************************************************************************* |
222 | * | 223 | * |
223 | * FUNCTION: acpi_unload_table | 224 | * FUNCTION: acpi_unload_table |
@@ -229,7 +230,6 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr) | |||
229 | * DESCRIPTION: This routine is used to force the unload of a table | 230 | * DESCRIPTION: This routine is used to force the unload of a table |
230 | * | 231 | * |
231 | ******************************************************************************/ | 232 | ******************************************************************************/ |
232 | |||
233 | acpi_status acpi_unload_table(acpi_table_type table_type) | 233 | acpi_status acpi_unload_table(acpi_table_type table_type) |
234 | { | 234 | { |
235 | struct acpi_table_desc *table_desc; | 235 | struct acpi_table_desc *table_desc; |
@@ -263,6 +263,8 @@ acpi_status acpi_unload_table(acpi_table_type table_type) | |||
263 | return_ACPI_STATUS(AE_OK); | 263 | return_ACPI_STATUS(AE_OK); |
264 | } | 264 | } |
265 | 265 | ||
266 | ACPI_EXPORT_SYMBOL(acpi_unload_table) | ||
267 | |||
266 | /******************************************************************************* | 268 | /******************************************************************************* |
267 | * | 269 | * |
268 | * FUNCTION: acpi_get_table_header | 270 | * FUNCTION: acpi_get_table_header |
@@ -283,7 +285,6 @@ acpi_status acpi_unload_table(acpi_table_type table_type) | |||
283 | * have a standard header and is fixed length. | 285 | * have a standard header and is fixed length. |
284 | * | 286 | * |
285 | ******************************************************************************/ | 287 | ******************************************************************************/ |
286 | |||
287 | acpi_status | 288 | acpi_status |
288 | acpi_get_table_header(acpi_table_type table_type, | 289 | acpi_get_table_header(acpi_table_type table_type, |
289 | u32 instance, struct acpi_table_header *out_table_header) | 290 | u32 instance, struct acpi_table_header *out_table_header) |
@@ -327,6 +328,7 @@ acpi_get_table_header(acpi_table_type table_type, | |||
327 | return_ACPI_STATUS(status); | 328 | return_ACPI_STATUS(status); |
328 | } | 329 | } |
329 | 330 | ||
331 | ACPI_EXPORT_SYMBOL(acpi_get_table_header) | ||
330 | #endif /* ACPI_FUTURE_USAGE */ | 332 | #endif /* ACPI_FUTURE_USAGE */ |
331 | 333 | ||
332 | /******************************************************************************* | 334 | /******************************************************************************* |
@@ -351,7 +353,6 @@ acpi_get_table_header(acpi_table_type table_type, | |||
351 | * a complete table including the header. | 353 | * a complete table including the header. |
352 | * | 354 | * |
353 | ******************************************************************************/ | 355 | ******************************************************************************/ |
354 | |||
355 | acpi_status | 356 | acpi_status |
356 | acpi_get_table(acpi_table_type table_type, | 357 | acpi_get_table(acpi_table_type table_type, |
357 | u32 instance, struct acpi_buffer *ret_buffer) | 358 | u32 instance, struct acpi_buffer *ret_buffer) |
@@ -420,4 +421,4 @@ acpi_get_table(acpi_table_type table_type, | |||
420 | return_ACPI_STATUS(AE_OK); | 421 | return_ACPI_STATUS(AE_OK); |
421 | } | 422 | } |
422 | 423 | ||
423 | EXPORT_SYMBOL(acpi_get_table); | 424 | ACPI_EXPORT_SYMBOL(acpi_get_table) |
diff --git a/drivers/acpi/tables/tbxfroot.c b/drivers/acpi/tables/tbxfroot.c index 7f68b759f15a..1b6d8c510e95 100644 --- a/drivers/acpi/tables/tbxfroot.c +++ b/drivers/acpi/tables/tbxfroot.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/actables.h> | 45 | #include <acpi/actables.h> |
48 | 46 | ||
@@ -263,7 +261,7 @@ acpi_get_firmware_table(acpi_string signature, | |||
263 | 261 | ||
264 | /* Get and validate the RSDT */ | 262 | /* Get and validate the RSDT */ |
265 | 263 | ||
266 | rsdt_info = ACPI_MEM_CALLOCATE(sizeof(struct acpi_table_desc)); | 264 | rsdt_info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_table_desc)); |
267 | if (!rsdt_info) { | 265 | if (!rsdt_info) { |
268 | return_ACPI_STATUS(AE_NO_MEMORY); | 266 | return_ACPI_STATUS(AE_NO_MEMORY); |
269 | } | 267 | } |
@@ -280,13 +278,13 @@ acpi_get_firmware_table(acpi_string signature, | |||
280 | 278 | ||
281 | /* Allocate a scratch table header and table descriptor */ | 279 | /* Allocate a scratch table header and table descriptor */ |
282 | 280 | ||
283 | header = ACPI_MEM_ALLOCATE(sizeof(struct acpi_table_header)); | 281 | header = ACPI_ALLOCATE(sizeof(struct acpi_table_header)); |
284 | if (!header) { | 282 | if (!header) { |
285 | status = AE_NO_MEMORY; | 283 | status = AE_NO_MEMORY; |
286 | goto cleanup; | 284 | goto cleanup; |
287 | } | 285 | } |
288 | 286 | ||
289 | table_info = ACPI_MEM_ALLOCATE(sizeof(struct acpi_table_desc)); | 287 | table_info = ACPI_ALLOCATE(sizeof(struct acpi_table_desc)); |
290 | if (!table_info) { | 288 | if (!table_info) { |
291 | status = AE_NO_MEMORY; | 289 | status = AE_NO_MEMORY; |
292 | goto cleanup; | 290 | goto cleanup; |
@@ -359,23 +357,21 @@ acpi_get_firmware_table(acpi_string signature, | |||
359 | acpi_os_unmap_memory(rsdt_info->pointer, | 357 | acpi_os_unmap_memory(rsdt_info->pointer, |
360 | (acpi_size) rsdt_info->pointer->length); | 358 | (acpi_size) rsdt_info->pointer->length); |
361 | } | 359 | } |
362 | ACPI_MEM_FREE(rsdt_info); | 360 | ACPI_FREE(rsdt_info); |
363 | 361 | ||
364 | if (header) { | 362 | if (header) { |
365 | ACPI_MEM_FREE(header); | 363 | ACPI_FREE(header); |
366 | } | 364 | } |
367 | if (table_info) { | 365 | if (table_info) { |
368 | ACPI_MEM_FREE(table_info); | 366 | ACPI_FREE(table_info); |
369 | } | 367 | } |
370 | return_ACPI_STATUS(status); | 368 | return_ACPI_STATUS(status); |
371 | } | 369 | } |
372 | 370 | ||
373 | EXPORT_SYMBOL(acpi_get_firmware_table); | 371 | ACPI_EXPORT_SYMBOL(acpi_get_firmware_table) |
374 | 372 | ||
375 | /* TBD: Move to a new file */ | 373 | /* TBD: Move to a new file */ |
376 | |||
377 | #if ACPI_MACHINE_WIDTH != 16 | 374 | #if ACPI_MACHINE_WIDTH != 16 |
378 | |||
379 | /******************************************************************************* | 375 | /******************************************************************************* |
380 | * | 376 | * |
381 | * FUNCTION: acpi_find_root_pointer | 377 | * FUNCTION: acpi_find_root_pointer |
@@ -388,7 +384,6 @@ EXPORT_SYMBOL(acpi_get_firmware_table); | |||
388 | * DESCRIPTION: Find the RSDP | 384 | * DESCRIPTION: Find the RSDP |
389 | * | 385 | * |
390 | ******************************************************************************/ | 386 | ******************************************************************************/ |
391 | |||
392 | acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address) | 387 | acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address) |
393 | { | 388 | { |
394 | struct acpi_table_desc table_info; | 389 | struct acpi_table_desc table_info; |
@@ -411,6 +406,8 @@ acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address) | |||
411 | return_ACPI_STATUS(AE_OK); | 406 | return_ACPI_STATUS(AE_OK); |
412 | } | 407 | } |
413 | 408 | ||
409 | ACPI_EXPORT_SYMBOL(acpi_find_root_pointer) | ||
410 | |||
414 | /******************************************************************************* | 411 | /******************************************************************************* |
415 | * | 412 | * |
416 | * FUNCTION: acpi_tb_scan_memory_for_rsdp | 413 | * FUNCTION: acpi_tb_scan_memory_for_rsdp |
@@ -423,7 +420,6 @@ acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address) | |||
423 | * DESCRIPTION: Search a block of memory for the RSDP signature | 420 | * DESCRIPTION: Search a block of memory for the RSDP signature |
424 | * | 421 | * |
425 | ******************************************************************************/ | 422 | ******************************************************************************/ |
426 | |||
427 | static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length) | 423 | static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length) |
428 | { | 424 | { |
429 | acpi_status status; | 425 | acpi_status status; |