diff options
Diffstat (limited to 'sys/contrib/dev/acpica/utdebug.c')
-rw-r--r-- | sys/contrib/dev/acpica/utdebug.c | 73 |
1 files changed, 17 insertions, 56 deletions
diff --git a/sys/contrib/dev/acpica/utdebug.c b/sys/contrib/dev/acpica/utdebug.c index 59b91d7..8846140 100644 --- a/sys/contrib/dev/acpica/utdebug.c +++ b/sys/contrib/dev/acpica/utdebug.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: utdebug - Debug print routines - * $Revision: 1.133 $ + * $Revision: 1.126 $ * *****************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp. * All rights reserved. * * 2. License @@ -212,14 +212,14 @@ AcpiUtTrimFunctionName ( /* All Function names are longer than 4 chars, check is safe */ - if (*(ACPI_CAST_PTR (UINT32, FunctionName)) == ACPI_PREFIX_MIXED) + if (*((UINT32 *) (uintptr_t) FunctionName) == ACPI_PREFIX_MIXED) { /* This is the case where the original source has not been modified */ return (FunctionName + 4); } - if (*(ACPI_CAST_PTR (UINT32, FunctionName)) == ACPI_PREFIX_LOWER) + if (*((UINT32 *) (uintptr_t) FunctionName) == ACPI_PREFIX_LOWER) { /* This is the case where the source has been 'linuxized' */ @@ -259,7 +259,7 @@ AcpiUtDebugPrint ( char *Format, ...) { - ACPI_THREAD_ID ThreadId; + UINT32 ThreadId; va_list args; @@ -276,6 +276,7 @@ AcpiUtDebugPrint ( * Thread tracking and context switch notification */ ThreadId = AcpiOsGetThreadId (); + if (ThreadId != AcpiGbl_PrevThreadId) { if (ACPI_LV_THREADS & AcpiDbgLevel) @@ -306,8 +307,6 @@ AcpiUtDebugPrint ( AcpiOsVprintf (Format, args); } -ACPI_EXPORT_SYMBOL (AcpiUtDebugPrint) - /******************************************************************************* * @@ -351,8 +350,6 @@ AcpiUtDebugPrintRaw ( AcpiOsVprintf (Format, args); } -ACPI_EXPORT_SYMBOL (AcpiUtDebugPrintRaw) - /******************************************************************************* * @@ -386,8 +383,6 @@ AcpiUtTrace ( "%s\n", AcpiGbl_FnEntryStr); } -ACPI_EXPORT_SYMBOL (AcpiUtTrace) - /******************************************************************************* * @@ -524,8 +519,6 @@ AcpiUtExit ( AcpiGbl_NestingLevel--; } -ACPI_EXPORT_SYMBOL (AcpiUtExit) - /******************************************************************************* * @@ -571,8 +564,6 @@ AcpiUtStatusExit ( AcpiGbl_NestingLevel--; } -ACPI_EXPORT_SYMBOL (AcpiUtStatusExit) - /******************************************************************************* * @@ -608,8 +599,6 @@ AcpiUtValueExit ( AcpiGbl_NestingLevel--; } -ACPI_EXPORT_SYMBOL (AcpiUtValueExit) - /******************************************************************************* * @@ -663,10 +652,11 @@ AcpiUtPtrExit ( ******************************************************************************/ void -AcpiUtDumpBuffer2 ( +AcpiUtDumpBuffer ( UINT8 *Buffer, UINT32 Count, - UINT32 Display) + UINT32 Display, + UINT32 ComponentId) { ACPI_NATIVE_UINT i = 0; ACPI_NATIVE_UINT j; @@ -674,6 +664,14 @@ AcpiUtDumpBuffer2 ( UINT8 BufChar; + /* Only dump the buffer if tracing is enabled */ + + if (!((ACPI_LV_TABLES & AcpiDbgLevel) && + (ComponentId & AcpiDbgLayer))) + { + return; + } + if ((Count < 4) || (Count & 0x01)) { Display = DB_BYTE_DISPLAY; @@ -702,7 +700,6 @@ AcpiUtDumpBuffer2 ( switch (Display) { - case DB_BYTE_DISPLAY: default: /* Default is BYTE display */ AcpiOsPrintf ("%02X ", Buffer[i + j]); @@ -769,39 +766,3 @@ AcpiUtDumpBuffer2 ( return; } - -/******************************************************************************* - * - * FUNCTION: AcpiUtDumpBuffer - * - * PARAMETERS: Buffer - Buffer to dump - * Count - Amount to dump, in bytes - * Display - BYTE, WORD, DWORD, or QWORD display - * ComponentID - Caller's component ID - * - * RETURN: None - * - * DESCRIPTION: Generic dump buffer in both hex and ascii. - * - ******************************************************************************/ - -void -AcpiUtDumpBuffer ( - UINT8 *Buffer, - UINT32 Count, - UINT32 Display, - UINT32 ComponentId) -{ - - /* Only dump the buffer if tracing is enabled */ - - if (!((ACPI_LV_TABLES & AcpiDbgLevel) && - (ComponentId & AcpiDbgLayer))) - { - return; - } - - AcpiUtDumpBuffer2 (Buffer, Count, Display); -} - - |