From: John Hodge Date: Fri, 26 Apr 2013 05:34:38 +0000 (+0800) Subject: Kernel/x86 - acpica: Debug to trace AE_NO_MEMORY cause X-Git-Tag: rel0.15~511 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=faad72a08c4bbd6b3b536c6c9b5201a203d45889;p=tpg%2Facess2.git Kernel/x86 - acpica: Debug to trace AE_NO_MEMORY cause --- diff --git a/KernelLand/Kernel/arch/x86/acpica.c b/KernelLand/Kernel/arch/x86/acpica.c index c2e5888d..15347892 100644 --- a/KernelLand/Kernel/arch/x86/acpica.c +++ b/KernelLand/Kernel/arch/x86/acpica.c @@ -170,11 +170,15 @@ ACPI_STATUS AcpiOsDeleteCache(ACPI_CACHE_T *Cache) ACPI_STATUS AcpiOsPurgeCache(ACPI_CACHE_T *Cache) { - if( Cache == NULL ) + ENTER("pCache", Cache); + if( Cache == NULL ) { + LEAVE('i', AE_BAD_PARAMETER); return AE_BAD_PARAMETER; + } memset(Cache->ObjectStates, 0, sizeof(char)*Cache->nObj); + LEAVE('i', AE_OK); return AE_OK; } @@ -192,7 +196,8 @@ void *AcpiOsAcquireObject(ACPI_CACHE_T *Cache) } } - Log_Debug("ACPICA", "AcpiOsAcquireObject: %i objects used", Cache->nObj); + Log_Debug("ACPICA", "AcpiOsAcquireObject: All %i objects used in '%s'", + Cache->nObj, Cache->Name); LEAVE('n'); return NULL; @@ -202,6 +207,7 @@ ACPI_STATUS AcpiOsReleaseObject(ACPI_CACHE_T *Cache, void *Object) { if( Cache == NULL || Object == NULL ) return AE_BAD_PARAMETER; + ENTER("pCache pObject", Cache, Object); tVAddr delta = (tVAddr)Object - (tVAddr)Cache->First; delta /= Cache->ObjectSize; @@ -212,6 +218,7 @@ ACPI_STATUS AcpiOsReleaseObject(ACPI_CACHE_T *Cache, void *Object) Cache->ObjectStates[delta] = 0; + LEAVE('i', AE_OK); return AE_OK; }