FreeBSD/sys/contrib/dev/acpica/components/utilities/utaddress.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiUtRemoveAddressRange
 *
 * PARAMETERS:  SpaceId             - Address space ID
 *              RegionNode          - OpRegion namespace node
 *
 * RETURN:      None
 *
 * DESCRIPTION: Remove the Operation Region from the global list. The only
 *              supported Space IDs are Memory and I/O. Called when an
 *              OpRegion is deleted.
 *
 * MUTEX:       Assumes the namespace is locked
 *
 ******************************************************************************/


None

Remove the Operation Region from the global list. The only
supported Space IDs are Memory and I/O. Called when an
OpRegion is deleted.

Assumes the namespace is locked
None Remove the Operation Region from the global list . The only supported Space IDs are Memory and I / O . Called when an OpRegion is deleted . Assumes the namespace is locked
void
AcpiUtRemoveAddressRange (
    ACPI_ADR_SPACE_TYPE     SpaceId,
    ACPI_NAMESPACE_NODE     *RegionNode)
{
    ACPI_ADDRESS_RANGE      *RangeInfo;
    ACPI_ADDRESS_RANGE      *Prev;
    ACPI_FUNCTION_TRACE (UtRemoveAddressRange);
    if ((SpaceId != ACPI_ADR_SPACE_SYSTEM_MEMORY) &&
        (SpaceId != ACPI_ADR_SPACE_SYSTEM_IO))
    {
        return_VOID;
    }
    RangeInfo = Prev = AcpiGbl_AddressRangeList[SpaceId];
    while (RangeInfo)
    {
        if (RangeInfo->RegionNode == RegionNode)
        {
            if (RangeInfo == Prev) 
            {
                AcpiGbl_AddressRangeList[SpaceId] = RangeInfo->Next;
            }
            else
            {
                Prev->Next = RangeInfo->Next;
            }
            ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
                "\nRemoved [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n",
                AcpiUtGetNodeName (RangeInfo->RegionNode),
                ACPI_FORMAT_UINT64 (RangeInfo->StartAddress),
                ACPI_FORMAT_UINT64 (RangeInfo->EndAddress)));
            ACPI_FREE (RangeInfo);
            return_VOID;
        }
        Prev = RangeInfo;
        RangeInfo = RangeInfo->Next;
    }
    return_VOID;
}
void AcpiUtRemoveAddressRange ( ACPI_ADR_SPACE_TYPE SpaceId , ACPI_NAMESPACE_NODE * RegionNode ) { ACPI_ADDRESS_RANGE * RangeInfo ; ACPI_ADDRESS_RANGE * Prev ; ACPI_FUNCTION_TRACE ( UtRemoveAddressRange ) ; if ( ( SpaceId != ACPI_ADR_SPACE_SYSTEM_MEMORY ) && ( SpaceId != ACPI_ADR_SPACE_SYSTEM_IO ) ) { return_VOID ; } RangeInfo = Prev = AcpiGbl_AddressRangeList [ SpaceId ] ; while ( RangeInfo ) { if ( RangeInfo -> RegionNode == RegionNode ) { if ( RangeInfo == Prev ) { AcpiGbl_AddressRangeList [ SpaceId ] = RangeInfo -> Next ; } else { Prev -> Next = RangeInfo -> Next ; } ACPI_DEBUG_PRINT ( ( ACPI_DB_NAMES , " \n \n " , AcpiUtGetNodeName ( RangeInfo -> RegionNode ) , ACPI_FORMAT_UINT64 ( RangeInfo -> StartAddress ) , ACPI_FORMAT_UINT64 ( RangeInfo -> EndAddress ) ) ) ; ACPI_FREE ( RangeInfo ) ; return_VOID ; } Prev = RangeInfo ; RangeInfo = RangeInfo -> Next ; } return_VOID ; }
FUNCTION:    AcpiUtRemoveAddressRange
 PARAMETERS:  SpaceId             - Address space ID
              RegionNode          - OpRegion namespace node
FUNCTION : AcpiUtRemoveAddressRange PARAMETERS : SpaceId - Address space ID RegionNode - OpRegion namespace node
/* Get the appropriate list head and check the list */ /* Found at list head */