diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/acconfig.h | 4 | ||||
-rw-r--r-- | include/acpi/aclocal.h | 9 | ||||
-rw-r--r-- | include/acpi/acmacros.h | 87 | ||||
-rw-r--r-- | include/acpi/acobject.h | 2 | ||||
-rw-r--r-- | include/acpi/acpiosxf.h | 4 | ||||
-rw-r--r-- | include/acpi/actypes.h | 41 | ||||
-rw-r--r-- | include/acpi/acutils.h | 25 | ||||
-rw-r--r-- | include/acpi/platform/acenv.h | 10 | ||||
-rw-r--r-- | include/acpi/platform/acgcc.h | 8 | ||||
-rw-r--r-- | include/acpi/platform/aclinux.h | 2 |
10 files changed, 107 insertions, 85 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 675a32f78329..e27dc8f29972 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h | |||
@@ -63,7 +63,7 @@ | |||
63 | 63 | ||
64 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 64 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
65 | 65 | ||
66 | #define ACPI_CA_VERSION 0x20060113 | 66 | #define ACPI_CA_VERSION 0x20060127 |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * OS name, used for the _OS object. The _OS object is essentially obsolete, | 69 | * OS name, used for the _OS object. The _OS object is essentially obsolete, |
@@ -83,7 +83,7 @@ | |||
83 | #define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */ | 83 | #define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */ |
84 | 84 | ||
85 | /* | 85 | /* |
86 | * Should the subystem abort the loading of an ACPI table if the | 86 | * Should the subsystem abort the loading of an ACPI table if the |
87 | * table checksum is incorrect? | 87 | * table checksum is incorrect? |
88 | */ | 88 | */ |
89 | #define ACPI_CHECKSUM_ABORT FALSE | 89 | #define ACPI_CHECKSUM_ABORT FALSE |
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h index 97f8e4185e4f..8361820d2970 100644 --- a/include/acpi/aclocal.h +++ b/include/acpi/aclocal.h | |||
@@ -416,13 +416,13 @@ struct acpi_field_info { | |||
416 | #define ACPI_CONTROL_PREDICATE_FALSE 0xC3 | 416 | #define ACPI_CONTROL_PREDICATE_FALSE 0xC3 |
417 | #define ACPI_CONTROL_PREDICATE_TRUE 0xC4 | 417 | #define ACPI_CONTROL_PREDICATE_TRUE 0xC4 |
418 | 418 | ||
419 | #define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\ | 419 | #define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\ |
420 | u8 data_type; /* To differentiate various internal objs */\ | 420 | u8 data_type; /* To differentiate various internal objs */\ |
421 | u8 flags; \ | 421 | u8 flags; \ |
422 | u16 value; \ | 422 | u16 value; \ |
423 | u16 state; \ | 423 | u16 state; \ |
424 | u16 reserved; \ | 424 | u16 reserved; \ |
425 | void *next; \ | 425 | void *next; |
426 | 426 | ||
427 | struct acpi_common_state { | 427 | struct acpi_common_state { |
428 | ACPI_STATE_COMMON}; | 428 | ACPI_STATE_COMMON}; |
@@ -575,8 +575,7 @@ union acpi_parse_value { | |||
575 | char aml_op_name[16]) /* Op name (debug only) */\ | 575 | char aml_op_name[16]) /* Op name (debug only) */\ |
576 | /* NON-DEBUG members below: */\ | 576 | /* NON-DEBUG members below: */\ |
577 | struct acpi_namespace_node *node; /* For use by interpreter */\ | 577 | struct acpi_namespace_node *node; /* For use by interpreter */\ |
578 | union acpi_parse_value value; /* Value or args associated with the opcode */\ | 578 | union acpi_parse_value value; /* Value or args associated with the opcode */ |
579 | |||
580 | 579 | ||
581 | #define ACPI_DASM_BUFFER 0x00 | 580 | #define ACPI_DASM_BUFFER 0x00 |
582 | #define ACPI_DASM_RESOURCE 0x01 | 581 | #define ACPI_DASM_RESOURCE 0x01 |
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h index 49ba151766de..f2be2a881730 100644 --- a/include/acpi/acmacros.h +++ b/include/acpi/acmacros.h | |||
@@ -341,8 +341,12 @@ | |||
341 | /* | 341 | /* |
342 | * Rounding macros (Power of two boundaries only) | 342 | * Rounding macros (Power of two boundaries only) |
343 | */ | 343 | */ |
344 | #define ACPI_ROUND_DOWN(value,boundary) (((acpi_native_uint)(value)) & (~(((acpi_native_uint) boundary)-1))) | 344 | #define ACPI_ROUND_DOWN(value,boundary) (((acpi_native_uint)(value)) & \ |
345 | #define ACPI_ROUND_UP(value,boundary) ((((acpi_native_uint)(value)) + (((acpi_native_uint) boundary)-1)) & (~(((acpi_native_uint) boundary)-1))) | 345 | (~(((acpi_native_uint) boundary)-1))) |
346 | |||
347 | #define ACPI_ROUND_UP(value,boundary) ((((acpi_native_uint)(value)) + \ | ||
348 | (((acpi_native_uint) boundary)-1)) & \ | ||
349 | (~(((acpi_native_uint) boundary)-1))) | ||
346 | 350 | ||
347 | #define ACPI_ROUND_DOWN_TO_32_BITS(a) ACPI_ROUND_DOWN(a,4) | 351 | #define ACPI_ROUND_DOWN_TO_32_BITS(a) ACPI_ROUND_DOWN(a,4) |
348 | #define ACPI_ROUND_DOWN_TO_64_BITS(a) ACPI_ROUND_DOWN(a,8) | 352 | #define ACPI_ROUND_DOWN_TO_64_BITS(a) ACPI_ROUND_DOWN(a,8) |
@@ -379,10 +383,11 @@ | |||
379 | 383 | ||
380 | /* Generate a UUID */ | 384 | /* Generate a UUID */ |
381 | 385 | ||
382 | #define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) (a) & 0xFF, ((a) >> 8) & 0xFF, ((a) >> 16) & 0xFF, ((a) >> 24) & 0xFF, \ | 386 | #define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \ |
383 | (b) & 0xFF, ((b) >> 8) & 0xFF, \ | 387 | (a) & 0xFF, ((a) >> 8) & 0xFF, ((a) >> 16) & 0xFF, ((a) >> 24) & 0xFF, \ |
384 | (c) & 0xFF, ((c) >> 8) & 0xFF, \ | 388 | (b) & 0xFF, ((b) >> 8) & 0xFF, \ |
385 | (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) | 389 | (c) & 0xFF, ((c) >> 8) & 0xFF, \ |
390 | (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) | ||
386 | 391 | ||
387 | /* | 392 | /* |
388 | * An struct acpi_namespace_node * can appear in some contexts, | 393 | * An struct acpi_namespace_node * can appear in some contexts, |
@@ -442,13 +447,12 @@ | |||
442 | #define GET_CURRENT_ARG_TYPE(list) (list & ((u32) 0x1F)) | 447 | #define GET_CURRENT_ARG_TYPE(list) (list & ((u32) 0x1F)) |
443 | #define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH)) | 448 | #define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH)) |
444 | 449 | ||
450 | #if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES) | ||
445 | /* | 451 | /* |
446 | * Module name is include in both debug and non-debug versions primarily for | 452 | * Module name is include in both debug and non-debug versions primarily for |
447 | * error messages. The __FILE__ macro is not very useful for this, because it | 453 | * error messages. The __FILE__ macro is not very useful for this, because it |
448 | * often includes the entire pathname to the module | 454 | * often includes the entire pathname to the module |
449 | */ | 455 | */ |
450 | #if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES) | ||
451 | |||
452 | #define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_acpi_module_name = name; | 456 | #define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_acpi_module_name = name; |
453 | #else | 457 | #else |
454 | #define ACPI_MODULE_NAME(name) | 458 | #define ACPI_MODULE_NAME(name) |
@@ -458,45 +462,31 @@ | |||
458 | * Ascii error messages can be configured out | 462 | * Ascii error messages can be configured out |
459 | */ | 463 | */ |
460 | #ifndef ACPI_NO_ERROR_MESSAGES | 464 | #ifndef ACPI_NO_ERROR_MESSAGES |
461 | 465 | #define AE_INFO _acpi_module_name, __LINE__ | |
462 | #define ACPI_PARAM_LIST(pl) pl | ||
463 | #define ACPI_LOCATION_INFO _acpi_module_name, __LINE__ | ||
464 | 466 | ||
465 | /* | 467 | /* |
466 | * Error reporting. Callers module and line number are inserted automatically | 468 | * Error reporting. Callers module and line number are inserted by AE_INFO, |
467 | * These macros are used for both the debug and non-debug versions of the code | 469 | * the plist contains a set of parens to allow variable-length lists. |
470 | * These macros are used for both the debug and non-debug versions of the code. | ||
468 | */ | 471 | */ |
469 | #define ACPI_REPORT_INFO(fp) {acpi_ut_report_info (ACPI_LOCATION_INFO); \ | 472 | #define ACPI_INFO(plist) acpi_ut_info plist |
470 | acpi_os_printf ACPI_PARAM_LIST (fp);} | 473 | #define ACPI_WARNING(plist) acpi_ut_warning plist |
471 | #define ACPI_REPORT_ERROR(fp) {acpi_ut_report_error (ACPI_LOCATION_INFO); \ | 474 | #define ACPI_EXCEPTION(plist) acpi_ut_exception plist |
472 | acpi_os_printf ACPI_PARAM_LIST (fp);} | 475 | #define ACPI_ERROR(plist) acpi_ut_error plist |
473 | #define ACPI_REPORT_WARNING(fp) {acpi_ut_report_warning (ACPI_LOCATION_INFO); \ | 476 | #define ACPI_ERROR_NAMESPACE(s,e) acpi_ns_report_error (AE_INFO, s, e); |
474 | acpi_os_printf ACPI_PARAM_LIST (fp);} | 477 | #define ACPI_ERROR_METHOD(s,n,p,e) acpi_ns_report_method_error (AE_INFO, s, n, p, e); |
475 | #define ACPI_REPORT_NSERROR(s,e) acpi_ns_report_error (ACPI_LOCATION_INFO, \ | ||
476 | s, e); | ||
477 | #define ACPI_REPORT_MTERROR(s,n,p,e) acpi_ns_report_method_error (ACPI_LOCATION_INFO, \ | ||
478 | s, n, p, e); | ||
479 | |||
480 | /* Error reporting. These versions pass thru the module and lineno */ | ||
481 | 478 | ||
482 | #define _ACPI_REPORT_INFO(a,b,fp) {acpi_ut_report_info (a,b); \ | ||
483 | acpi_os_printf ACPI_PARAM_LIST (fp);} | ||
484 | #define _ACPI_REPORT_ERROR(a,b,fp) {acpi_ut_report_error (a,b); \ | ||
485 | acpi_os_printf ACPI_PARAM_LIST (fp);} | ||
486 | #define _ACPI_REPORT_WARNING(a,b,fp) {acpi_ut_report_warning (a,b); \ | ||
487 | acpi_os_printf ACPI_PARAM_LIST (fp);} | ||
488 | #else | 479 | #else |
489 | 480 | ||
490 | /* No error messages */ | 481 | /* No error messages */ |
491 | 482 | ||
492 | #define ACPI_REPORT_INFO(fp) | 483 | #define ACPI_INFO(plist) |
493 | #define ACPI_REPORT_ERROR(fp) | 484 | #define ACPI_WARNING(plist) |
494 | #define ACPI_REPORT_WARNING(fp) | 485 | #define ACPI_EXCEPTION(plist) |
495 | #define ACPI_REPORT_NSERROR(s,e) | 486 | #define ACPI_ERROR(plist) |
496 | #define ACPI_REPORT_MTERROR(s,n,p,e) | 487 | #define ACPI_ERROR_NAMESPACE(s,e) |
497 | #define _ACPI_REPORT_INFO(a,b,c,fp) | 488 | #define ACPI_ERROR_METHOD(s,n,p,e) |
498 | #define _ACPI_REPORT_ERROR(a,b,c,fp) | 489 | |
499 | #define _ACPI_REPORT_WARNING(a,b,c,fp) | ||
500 | #endif | 490 | #endif |
501 | 491 | ||
502 | /* | 492 | /* |
@@ -538,7 +528,7 @@ | |||
538 | #endif | 528 | #endif |
539 | 529 | ||
540 | #define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \ | 530 | #define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \ |
541 | acpi_ut_trace(ACPI_DEBUG_PARAMETERS) | 531 | acpi_ut_trace(ACPI_DEBUG_PARAMETERS) |
542 | #define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a) \ | 532 | #define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a) \ |
543 | acpi_ut_trace_ptr(ACPI_DEBUG_PARAMETERS,(void *)b) | 533 | acpi_ut_trace_ptr(ACPI_DEBUG_PARAMETERS,(void *)b) |
544 | #define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a) \ | 534 | #define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a) \ |
@@ -632,18 +622,6 @@ | |||
632 | #define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d) | 622 | #define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d) |
633 | #define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a) | 623 | #define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a) |
634 | #define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT) | 624 | #define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT) |
635 | #define ACPI_BREAK_MSG(a) acpi_os_signal (ACPI_SIGNAL_BREAKPOINT,(a)) | ||
636 | |||
637 | /* | ||
638 | * Generate INT3 on ACPI_ERROR (Debug only!) | ||
639 | */ | ||
640 | #define ACPI_ERROR_BREAK | ||
641 | #ifdef ACPI_ERROR_BREAK | ||
642 | #define ACPI_BREAK_ON_ERROR(lvl) if ((lvl)&ACPI_ERROR) \ | ||
643 | acpi_os_signal(ACPI_SIGNAL_BREAKPOINT,"Fatal error encountered\n") | ||
644 | #else | ||
645 | #define ACPI_BREAK_ON_ERROR(lvl) | ||
646 | #endif | ||
647 | 625 | ||
648 | /* | 626 | /* |
649 | * Master debug print macros | 627 | * Master debug print macros |
@@ -651,8 +629,8 @@ | |||
651 | * 1) Debug print for the current component is enabled | 629 | * 1) Debug print for the current component is enabled |
652 | * 2) Debug error level or trace level for the print statement is enabled | 630 | * 2) Debug error level or trace level for the print statement is enabled |
653 | */ | 631 | */ |
654 | #define ACPI_DEBUG_PRINT(pl) acpi_ut_debug_print ACPI_PARAM_LIST(pl) | 632 | #define ACPI_DEBUG_PRINT(plist) acpi_ut_debug_print plist |
655 | #define ACPI_DEBUG_PRINT_RAW(pl) acpi_ut_debug_print_raw ACPI_PARAM_LIST(pl) | 633 | #define ACPI_DEBUG_PRINT_RAW(plist) acpi_ut_debug_print_raw plist |
656 | 634 | ||
657 | #else | 635 | #else |
658 | /* | 636 | /* |
@@ -681,7 +659,6 @@ | |||
681 | #define ACPI_DUMP_BUFFER(a,b) | 659 | #define ACPI_DUMP_BUFFER(a,b) |
682 | #define ACPI_DEBUG_PRINT(pl) | 660 | #define ACPI_DEBUG_PRINT(pl) |
683 | #define ACPI_DEBUG_PRINT_RAW(pl) | 661 | #define ACPI_DEBUG_PRINT_RAW(pl) |
684 | #define ACPI_BREAK_MSG(a) | ||
685 | 662 | ||
686 | #define return_VOID return | 663 | #define return_VOID return |
687 | #define return_ACPI_STATUS(s) return(s) | 664 | #define return_ACPI_STATUS(s) return(s) |
diff --git a/include/acpi/acobject.h b/include/acpi/acobject.h index 1bd411962c77..d130cfed8d55 100644 --- a/include/acpi/acobject.h +++ b/include/acpi/acobject.h | |||
@@ -69,7 +69,7 @@ | |||
69 | u8 type; /* acpi_object_type */\ | 69 | u8 type; /* acpi_object_type */\ |
70 | u16 reference_count; /* For object deletion management */\ | 70 | u16 reference_count; /* For object deletion management */\ |
71 | union acpi_operand_object *next_object; /* Objects linked to parent NS node */\ | 71 | union acpi_operand_object *next_object; /* Objects linked to parent NS node */\ |
72 | u8 flags; \ | 72 | u8 flags; |
73 | 73 | ||
74 | /* Values for flag byte above */ | 74 | /* Values for flag byte above */ |
75 | 75 | ||
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 768f63f391cd..970e9a6372c3 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -108,9 +108,9 @@ acpi_status acpi_os_create_lock(acpi_handle * out_handle); | |||
108 | 108 | ||
109 | void acpi_os_delete_lock(acpi_handle handle); | 109 | void acpi_os_delete_lock(acpi_handle handle); |
110 | 110 | ||
111 | acpi_native_uint acpi_os_acquire_lock(acpi_handle handle); | 111 | acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle); |
112 | 112 | ||
113 | void acpi_os_release_lock(acpi_handle handle, acpi_native_uint flags); | 113 | void acpi_os_release_lock(acpi_handle handle, acpi_cpu_flags flags); |
114 | 114 | ||
115 | /* | 115 | /* |
116 | * Memory allocation and mapping | 116 | * Memory allocation and mapping |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 74819e9b4699..7ca89cde706e 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -237,17 +237,22 @@ typedef char *acpi_physical_address; | |||
237 | #error unknown ACPI_MACHINE_WIDTH | 237 | #error unknown ACPI_MACHINE_WIDTH |
238 | #endif | 238 | #endif |
239 | 239 | ||
240 | /* Variable-width type, used instead of clib size_t */ | ||
241 | |||
242 | typedef acpi_native_uint acpi_size; | ||
243 | |||
240 | /******************************************************************************* | 244 | /******************************************************************************* |
241 | * | 245 | * |
242 | * OS- or compiler-dependent types | 246 | * OS- or compiler-dependent types |
243 | * | 247 | * |
248 | * If the defaults below are not appropriate for the host system, they can | ||
249 | * be defined in the compiler-specific or OS-specific header, and this will | ||
250 | * take precedence. | ||
251 | * | ||
244 | ******************************************************************************/ | 252 | ******************************************************************************/ |
245 | 253 | ||
246 | /* | 254 | /* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */ |
247 | * If acpi_uintptr_t was not defined in the OS- or compiler-dependent header, | 255 | |
248 | * define it now (use C99 uintptr_t for pointer casting if available, | ||
249 | * "void *" otherwise) | ||
250 | */ | ||
251 | #ifndef acpi_uintptr_t | 256 | #ifndef acpi_uintptr_t |
252 | #define acpi_uintptr_t void * | 257 | #define acpi_uintptr_t void * |
253 | #endif | 258 | #endif |
@@ -261,9 +266,31 @@ typedef char *acpi_physical_address; | |||
261 | #define acpi_cache_t struct acpi_memory_list | 266 | #define acpi_cache_t struct acpi_memory_list |
262 | #endif | 267 | #endif |
263 | 268 | ||
264 | /* Variable-width type, used instead of clib size_t */ | 269 | /* |
270 | * Allow the CPU flags word to be defined per-OS to simplify the use of the | ||
271 | * lock and unlock OSL interfaces. | ||
272 | */ | ||
273 | #ifndef acpi_cpu_flags | ||
274 | #define acpi_cpu_flags acpi_native_uint | ||
275 | #endif | ||
265 | 276 | ||
266 | typedef acpi_native_uint acpi_size; | 277 | /* |
278 | * ACPI_PRINTF_LIKE is used to tag functions as "printf-like" because | ||
279 | * some compilers can catch printf format string problems | ||
280 | */ | ||
281 | #ifndef ACPI_PRINTF_LIKE | ||
282 | #define ACPI_PRINTF_LIKE(c) | ||
283 | #endif | ||
284 | |||
285 | /* | ||
286 | * Some compilers complain about unused variables. Sometimes we don't want to | ||
287 | * use all the variables (for example, _acpi_module_name). This allows us | ||
288 | * to to tell the compiler in a per-variable manner that a variable | ||
289 | * is unused | ||
290 | */ | ||
291 | #ifndef ACPI_UNUSED_VAR | ||
292 | #define ACPI_UNUSED_VAR | ||
293 | #endif | ||
267 | 294 | ||
268 | /******************************************************************************* | 295 | /******************************************************************************* |
269 | * | 296 | * |
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h index 10f6625f6390..0927765df6aa 100644 --- a/include/acpi/acutils.h +++ b/include/acpi/acutils.h | |||
@@ -275,20 +275,22 @@ acpi_ut_ptr_exit(u32 line_number, | |||
275 | const char *function_name, | 275 | const char *function_name, |
276 | char *module_name, u32 component_id, u8 * ptr); | 276 | char *module_name, u32 component_id, u8 * ptr); |
277 | 277 | ||
278 | void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id); | ||
279 | |||
278 | void acpi_ut_report_error(char *module_name, u32 line_number); | 280 | void acpi_ut_report_error(char *module_name, u32 line_number); |
279 | 281 | ||
280 | void acpi_ut_report_info(char *module_name, u32 line_number); | 282 | void acpi_ut_report_info(char *module_name, u32 line_number); |
281 | 283 | ||
282 | void acpi_ut_report_warning(char *module_name, u32 line_number); | 284 | void acpi_ut_report_warning(char *module_name, u32 line_number); |
283 | 285 | ||
284 | void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id); | 286 | /* Error and message reporting interfaces */ |
285 | 287 | ||
286 | void ACPI_INTERNAL_VAR_XFACE | 288 | void ACPI_INTERNAL_VAR_XFACE |
287 | acpi_ut_debug_print(u32 requested_debug_level, | 289 | acpi_ut_debug_print(u32 requested_debug_level, |
288 | u32 line_number, | 290 | u32 line_number, |
289 | const char *function_name, | 291 | const char *function_name, |
290 | char *module_name, | 292 | char *module_name, |
291 | u32 component_id, char *format, ...) ACPI_PRINTF_LIKE_FUNC; | 293 | u32 component_id, char *format, ...) ACPI_PRINTF_LIKE(6); |
292 | 294 | ||
293 | void ACPI_INTERNAL_VAR_XFACE | 295 | void ACPI_INTERNAL_VAR_XFACE |
294 | acpi_ut_debug_print_raw(u32 requested_debug_level, | 296 | acpi_ut_debug_print_raw(u32 requested_debug_level, |
@@ -296,7 +298,24 @@ acpi_ut_debug_print_raw(u32 requested_debug_level, | |||
296 | const char *function_name, | 298 | const char *function_name, |
297 | char *module_name, | 299 | char *module_name, |
298 | u32 component_id, | 300 | u32 component_id, |
299 | char *format, ...) ACPI_PRINTF_LIKE_FUNC; | 301 | char *format, ...) ACPI_PRINTF_LIKE(6); |
302 | |||
303 | void ACPI_INTERNAL_VAR_XFACE | ||
304 | acpi_ut_error(char *module_name, | ||
305 | u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); | ||
306 | |||
307 | void ACPI_INTERNAL_VAR_XFACE | ||
308 | acpi_ut_exception(char *module_name, | ||
309 | u32 line_number, | ||
310 | acpi_status status, char *format, ...) ACPI_PRINTF_LIKE(4); | ||
311 | |||
312 | void ACPI_INTERNAL_VAR_XFACE | ||
313 | acpi_ut_warning(char *module_name, | ||
314 | u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); | ||
315 | |||
316 | void ACPI_INTERNAL_VAR_XFACE | ||
317 | acpi_ut_info(char *module_name, | ||
318 | u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); | ||
300 | 319 | ||
301 | /* | 320 | /* |
302 | * utdelete - Object deletion and reference counts | 321 | * utdelete - Object deletion and reference counts |
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index 31b0f18342f6..223ec6467108 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h | |||
@@ -149,6 +149,9 @@ | |||
149 | #elif defined(NETWARE) | 149 | #elif defined(NETWARE) |
150 | #include "acnetware.h" | 150 | #include "acnetware.h" |
151 | 151 | ||
152 | #elif defined(__sun) | ||
153 | #include "acsolaris.h" | ||
154 | |||
152 | #else | 155 | #else |
153 | 156 | ||
154 | /* All other environments */ | 157 | /* All other environments */ |
@@ -158,13 +161,6 @@ | |||
158 | #define COMPILER_DEPENDENT_INT64 long long | 161 | #define COMPILER_DEPENDENT_INT64 long long |
159 | #define COMPILER_DEPENDENT_UINT64 unsigned long long | 162 | #define COMPILER_DEPENDENT_UINT64 unsigned long long |
160 | 163 | ||
161 | /* | ||
162 | * This macro is used to tag functions as "printf-like" because | ||
163 | * some compilers can catch printf format string problems. MSVC | ||
164 | * doesn't, so this is proprocessed away. | ||
165 | */ | ||
166 | #define ACPI_PRINTF_LIKE_FUNC | ||
167 | |||
168 | #endif | 164 | #endif |
169 | 165 | ||
170 | /* | 166 | /* |
diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h index ea2a6322f64d..da80933963db 100644 --- a/include/acpi/platform/acgcc.h +++ b/include/acpi/platform/acgcc.h | |||
@@ -48,12 +48,14 @@ | |||
48 | 48 | ||
49 | #define ACPI_GET_FUNCTION_NAME __FUNCTION__ | 49 | #define ACPI_GET_FUNCTION_NAME __FUNCTION__ |
50 | 50 | ||
51 | /* This macro is used to tag functions as "printf-like" because | 51 | /* |
52 | * This macro is used to tag functions as "printf-like" because | ||
52 | * some compilers (like GCC) can catch printf format string problems. | 53 | * some compilers (like GCC) can catch printf format string problems. |
53 | */ | 54 | */ |
54 | #define ACPI_PRINTF_LIKE_FUNC __attribute__ ((__format__ (__printf__, 6, 7))) | 55 | #define ACPI_PRINTF_LIKE(c) __attribute__ ((__format__ (__printf__, c, c+1))) |
55 | 56 | ||
56 | /* Some compilers complain about unused variables. Sometimes we don't want to | 57 | /* |
58 | * Some compilers complain about unused variables. Sometimes we don't want to | ||
57 | * use all the variables (for example, _acpi_module_name). This allows us | 59 | * use all the variables (for example, _acpi_module_name). This allows us |
58 | * to to tell the compiler warning in a per-variable manner that a variable | 60 | * to to tell the compiler warning in a per-variable manner that a variable |
59 | * is unused. | 61 | * is unused. |
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index c21c27fe7e1e..2e6d54569ee8 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -102,4 +102,6 @@ | |||
102 | 102 | ||
103 | #include "acgcc.h" | 103 | #include "acgcc.h" |
104 | 104 | ||
105 | #define acpi_cpu_flags unsigned long | ||
106 | |||
105 | #endif /* __ACLINUX_H__ */ | 107 | #endif /* __ACLINUX_H__ */ |