Print this page
update to acpica-unix2-20140114
update to acpica-unix2-20131218
acpica-unix2-20130823
PANKOVs restructure

*** 3,13 **** * Module Name: utcache - local cache allocation routines * *****************************************************************************/ /* ! * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: --- 3,13 ---- * Module Name: utcache - local cache allocation routines * *****************************************************************************/ /* ! * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:
*** 93,103 **** } /* Populate the cache object and return it */ ACPI_MEMSET (Cache, 0, sizeof (ACPI_MEMORY_LIST)); - Cache->LinkOffset = 8; Cache->ListName = CacheName; Cache->ObjectSize = ObjectSize; Cache->MaxDepth = MaxDepth; *ReturnCache = Cache; --- 93,102 ----
*** 119,129 **** ACPI_STATUS AcpiOsPurgeCache ( ACPI_MEMORY_LIST *Cache) { ! char *Next; ACPI_STATUS Status; ACPI_FUNCTION_ENTRY (); --- 118,128 ---- ACPI_STATUS AcpiOsPurgeCache ( ACPI_MEMORY_LIST *Cache) { ! void *Next; ACPI_STATUS Status; ACPI_FUNCTION_ENTRY ();
*** 143,154 **** while (Cache->ListHead) { /* Delete and unlink one cached state object */ ! Next = *(ACPI_CAST_INDIRECT_PTR (char, ! &(((char *) Cache->ListHead)[Cache->LinkOffset]))); ACPI_FREE (Cache->ListHead); Cache->ListHead = Next; Cache->CurrentDepth--; } --- 142,152 ---- while (Cache->ListHead) { /* Delete and unlink one cached state object */ ! Next = ACPI_GET_DESCRIPTOR_PTR (Cache->ListHead); ACPI_FREE (Cache->ListHead); Cache->ListHead = Next; Cache->CurrentDepth--; }
*** 249,260 **** ACPI_MEMSET (Object, 0xCA, Cache->ObjectSize); ACPI_SET_DESCRIPTOR_TYPE (Object, ACPI_DESC_TYPE_CACHED); /* Put the object at the head of the cache list */ ! * (ACPI_CAST_INDIRECT_PTR (char, ! &(((char *) Object)[Cache->LinkOffset]))) = Cache->ListHead; Cache->ListHead = Object; Cache->CurrentDepth++; (void) AcpiUtReleaseMutex (ACPI_MTX_CACHES); } --- 247,257 ---- ACPI_MEMSET (Object, 0xCA, Cache->ObjectSize); ACPI_SET_DESCRIPTOR_TYPE (Object, ACPI_DESC_TYPE_CACHED); /* Put the object at the head of the cache list */ ! ACPI_SET_DESCRIPTOR_PTR (Object, Cache->ListHead); Cache->ListHead = Object; Cache->CurrentDepth++; (void) AcpiUtReleaseMutex (ACPI_MTX_CACHES); }
*** 287,303 **** ACPI_FUNCTION_NAME (OsAcquireObject); if (!Cache) { ! return (NULL); } Status = AcpiUtAcquireMutex (ACPI_MTX_CACHES); if (ACPI_FAILURE (Status)) { ! return (NULL); } ACPI_MEM_TRACKING (Cache->Requests++); /* Check the cache first */ --- 284,300 ---- ACPI_FUNCTION_NAME (OsAcquireObject); if (!Cache) { ! return_PTR (NULL); } Status = AcpiUtAcquireMutex (ACPI_MTX_CACHES); if (ACPI_FAILURE (Status)) { ! return_PTR (NULL); } ACPI_MEM_TRACKING (Cache->Requests++); /* Check the cache first */
*** 305,316 **** if (Cache->ListHead) { /* There is an object available, use it */ Object = Cache->ListHead; ! Cache->ListHead = *(ACPI_CAST_INDIRECT_PTR (char, ! &(((char *) Object)[Cache->LinkOffset]))); Cache->CurrentDepth--; ACPI_MEM_TRACKING (Cache->Hits++); ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, --- 302,312 ---- if (Cache->ListHead) { /* There is an object available, use it */ Object = Cache->ListHead; ! Cache->ListHead = ACPI_GET_DESCRIPTOR_PTR (Object); Cache->CurrentDepth--; ACPI_MEM_TRACKING (Cache->Hits++); ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
*** 317,327 **** "Object %p from %s cache\n", Object, Cache->ListName)); Status = AcpiUtReleaseMutex (ACPI_MTX_CACHES); if (ACPI_FAILURE (Status)) { ! return (NULL); } /* Clear (zero) the previously used Object */ ACPI_MEMSET (Object, 0, Cache->ObjectSize); --- 313,323 ---- "Object %p from %s cache\n", Object, Cache->ListName)); Status = AcpiUtReleaseMutex (ACPI_MTX_CACHES); if (ACPI_FAILURE (Status)) { ! return_PTR (NULL); } /* Clear (zero) the previously used Object */ ACPI_MEMSET (Object, 0, Cache->ObjectSize);
*** 342,361 **** /* Avoid deadlock with ACPI_ALLOCATE_ZEROED */ Status = AcpiUtReleaseMutex (ACPI_MTX_CACHES); if (ACPI_FAILURE (Status)) { ! return (NULL); } Object = ACPI_ALLOCATE_ZEROED (Cache->ObjectSize); if (!Object) { ! return (NULL); } } ! return (Object); } #endif /* ACPI_USE_LOCAL_CACHE */ - - --- 338,355 ---- /* Avoid deadlock with ACPI_ALLOCATE_ZEROED */ Status = AcpiUtReleaseMutex (ACPI_MTX_CACHES); if (ACPI_FAILURE (Status)) { ! return_PTR (NULL); } Object = ACPI_ALLOCATE_ZEROED (Cache->ObjectSize); if (!Object) { ! return_PTR (NULL); } } ! return_PTR (Object); } #endif /* ACPI_USE_LOCAL_CACHE */