4d3
< * $Revision: 1.199 $
12c11
< * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
---
> * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp.
122,139d120
< * Data manipulation macros
< */
< #define ACPI_LOWORD(l) ((UINT16)(UINT32)(l))
< #define ACPI_HIWORD(l) ((UINT16)((((UINT32)(l)) >> 16) & 0xFFFF))
< #define ACPI_LOBYTE(l) ((UINT8)(UINT16)(l))
< #define ACPI_HIBYTE(l) ((UINT8)((((UINT16)(l)) >> 8) & 0xFF))
<
< #define ACPI_SET_BIT(target,bit) ((target) |= (bit))
< #define ACPI_CLEAR_BIT(target,bit) ((target) &= ~(bit))
< #define ACPI_MIN(a,b) (((a)<(b))?(a):(b))
< #define ACPI_MAX(a,b) (((a)>(b))?(a):(b))
<
< /* Size calculation */
<
< #define ACPI_ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0]))
<
<
< /*
154,188d134
< * Pointer manipulation
< */
< #define ACPI_CAST_PTR(t, p) ((t *) (ACPI_UINTPTR_T) (p))
< #define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (ACPI_UINTPTR_T) (p))
< #define ACPI_ADD_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (UINT8, (a)) + (ACPI_SIZE)(b)))
< #define ACPI_PTR_DIFF(a, b) (ACPI_SIZE) (ACPI_CAST_PTR (UINT8, (a)) - ACPI_CAST_PTR (UINT8, (b)))
<
< /* Pointer/Integer type conversions */
<
< #define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void, (void *) NULL,(ACPI_SIZE) i)
< #define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p, (void *) NULL)
< #define ACPI_OFFSET(d, f) (ACPI_SIZE) ACPI_PTR_DIFF (&(((d *)0)->f), (void *) NULL)
< #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i)
< #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i)
<
< #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
< #define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (UINT32, (a)) == *ACPI_CAST_PTR (UINT32, (b)))
< #else
< #define ACPI_COMPARE_NAME(a,b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAME_SIZE))
< #endif
<
< /*
< * Full 64-bit integer must be available on both 32-bit and 64-bit platforms
< */
< typedef struct acpi_integer_overlay
< {
< UINT32 LoDword;
< UINT32 HiDword;
<
< } ACPI_INTEGER_OVERLAY;
<
< #define ACPI_LODWORD(Integer) (ACPI_CAST_PTR (ACPI_INTEGER_OVERLAY, &Integer)->LoDword)
< #define ACPI_HIDWORD(Integer) (ACPI_CAST_PTR (ACPI_INTEGER_OVERLAY, &Integer)->HiDword)
<
< /*
290c236
< * the destination (or both) is/are unaligned. (Little-endian move)
---
> * the destination (or both) is/are unaligned. (Little-endian move)
412,415d357
< /* Macro to test the object type */
<
< #define ACPI_GET_OBJECT_TYPE(d) (((ACPI_OPERAND_OBJECT *)(void *)(d))->Common.Type)
<
427,432d368
< #ifdef ACPI_DISASSEMBLER
< #define ACPI_DISASM_ONLY_MEMBERS(a) a;
< #else
< #define ACPI_DISASM_ONLY_MEMBERS(a)
< #endif
<
458,459d393
<
< #if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES)
461,470d394
< * Module name is include in both debug and non-debug versions primarily for
< * error messages. The __FILE__ macro is not very useful for this, because it
< * often includes the entire pathname to the module
< */
< #define ACPI_MODULE_NAME(Name) static const char ACPI_UNUSED_VAR _AcpiModuleName[] = Name;
< #else
< #define ACPI_MODULE_NAME(Name)
< #endif
<
< /*
474,475d397
< #define AE_INFO _AcpiModuleName, __LINE__
<
481,484d402
< #define ACPI_INFO(plist) AcpiUtInfo plist
< #define ACPI_WARNING(plist) AcpiUtWarning plist
< #define ACPI_EXCEPTION(plist) AcpiUtException plist
< #define ACPI_ERROR(plist) AcpiUtError plist
492,495d409
< #define ACPI_INFO(plist)
< #define ACPI_WARNING(plist)
< #define ACPI_EXCEPTION(plist)
< #define ACPI_ERROR(plist)
498d411
< #endif
499a413,414
> #endif /* ACPI_NO_ERROR_MESSAGES */
>
504d418
<
506,511d419
< * Common parameters used for debug output functions:
< * line number, function name, module(file) name, component ID
< */
< #define ACPI_DEBUG_PARAMETERS __LINE__, ACPI_GET_FUNCTION_NAME, _AcpiModuleName, _COMPONENT
<
< /*
514,535d421
<
< /*
< * If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header,
< * define it now. This is the case where there the compiler does not support
< * a __FUNCTION__ macro or equivalent.
< */
< #ifndef ACPI_GET_FUNCTION_NAME
< #define ACPI_GET_FUNCTION_NAME _AcpiFunctionName
< /*
< * The Name parameter should be the procedure name as a quoted string.
< * The function name is also used by the function exit macros below.
< * Note: (const char) is used to be compatible with the debug interfaces
< * and macros such as __FUNCTION__.
< */
< #define ACPI_FUNCTION_NAME(Name) static const char _AcpiFunctionName[] = #Name;
<
< #else
< /* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */
<
< #define ACPI_FUNCTION_NAME(Name)
< #endif
<
629,638d514
< /*
< * Master debug print macros
< * Print iff:
< * 1) Debug print for the current component is enabled
< * 2) Debug error level or trace level for the print statement is enabled
< */
< #define ACPI_DEBUG_PRINT(plist) AcpiUtDebugPrint plist
< #define ACPI_DEBUG_PRINT_RAW(plist) AcpiUtDebugPrintRaw plist
<
<
646d521
< #define ACPI_FUNCTION_NAME(a)
671c546
< #endif
---
> #endif /* ACPI_DEBUG_OUTPUT */