Print this page
acpica-unix2-20130823
PANKOVs restructure
   1 /******************************************************************************
   2  *
   3  * Module Name: dsinit - Object initialization namespace walk
   4  *
   5  *****************************************************************************/
   6 
   7 /*
   8  * Copyright (C) 2000 - 2011, Intel Corp.
   9  * All rights reserved.
  10  *
  11  * Redistribution and use in source and binary forms, with or without
  12  * modification, are permitted provided that the following conditions
  13  * are met:
  14  * 1. Redistributions of source code must retain the above copyright
  15  *    notice, this list of conditions, and the following disclaimer,
  16  *    without modification.
  17  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  18  *    substantially similar to the "NO WARRANTY" disclaimer below
  19  *    ("Disclaimer") and any redistribution must be conditioned upon
  20  *    including a substantially similar Disclaimer requirement for further
  21  *    binary redistribution.
  22  * 3. Neither the names of the above-listed copyright holders nor the names
  23  *    of any contributors may be used to endorse or promote products derived
  24  *    from this software without specific prior written permission.
  25  *
  26  * Alternatively, this software may be distributed under the terms of the
  27  * GNU General Public License ("GPL") version 2 as published by the Free
  28  * Software Foundation.


 111 
 112     /* And even then, we are only interested in a few object types */
 113 
 114     Type = AcpiNsGetType (ObjHandle);
 115 
 116     switch (Type)
 117     {
 118     case ACPI_TYPE_REGION:
 119 
 120         Status = AcpiDsInitializeRegion (ObjHandle);
 121         if (ACPI_FAILURE (Status))
 122         {
 123             ACPI_EXCEPTION ((AE_INFO, Status,
 124                 "During Region initialization %p [%4.4s]",
 125                 ObjHandle, AcpiUtGetNodeName (ObjHandle)));
 126         }
 127 
 128         Info->OpRegionCount++;
 129         break;
 130 
 131 
 132     case ACPI_TYPE_METHOD:
 133 
 134         Info->MethodCount++;
 135         break;
 136 
 137 
 138     case ACPI_TYPE_DEVICE:
 139 
 140         Info->DeviceCount++;
 141         break;
 142 
 143 
 144     default:

 145         break;
 146     }
 147 
 148     /*
 149      * We ignore errors from above, and always return OK, since
 150      * we don't want to abort the walk on a single error.
 151      */
 152     return (AE_OK);
 153 }
 154 
 155 
 156 /*******************************************************************************
 157  *
 158  * FUNCTION:    AcpiDsInitializeObjects
 159  *
 160  * PARAMETERS:  TableDesc       - Descriptor for parent ACPI table
 161  *              StartNode       - Root of subtree to be initialized.
 162  *
 163  * RETURN:      Status
 164  *


 217         ACPI_EXCEPTION ((AE_INFO, Status, "During WalkNamespace"));
 218     }
 219     (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
 220 
 221     Status = AcpiGetTableByIndex (TableIndex, &Table);
 222     if (ACPI_FAILURE (Status))
 223     {
 224         return_ACPI_STATUS (Status);
 225     }
 226 
 227     ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
 228         "\nTable [%4.4s](id %4.4X) - %u Objects with %u Devices %u Methods %u Regions\n",
 229         Table->Signature, OwnerId, Info.ObjectCount,
 230         Info.DeviceCount, Info.MethodCount, Info.OpRegionCount));
 231 
 232     ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
 233         "%u Methods, %u Regions\n", Info.MethodCount, Info.OpRegionCount));
 234 
 235     return_ACPI_STATUS (AE_OK);
 236 }
 237 
 238 
   1 /******************************************************************************
   2  *
   3  * Module Name: dsinit - Object initialization namespace walk
   4  *
   5  *****************************************************************************/
   6 
   7 /*
   8  * Copyright (C) 2000 - 2013, Intel Corp.
   9  * All rights reserved.
  10  *
  11  * Redistribution and use in source and binary forms, with or without
  12  * modification, are permitted provided that the following conditions
  13  * are met:
  14  * 1. Redistributions of source code must retain the above copyright
  15  *    notice, this list of conditions, and the following disclaimer,
  16  *    without modification.
  17  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  18  *    substantially similar to the "NO WARRANTY" disclaimer below
  19  *    ("Disclaimer") and any redistribution must be conditioned upon
  20  *    including a substantially similar Disclaimer requirement for further
  21  *    binary redistribution.
  22  * 3. Neither the names of the above-listed copyright holders nor the names
  23  *    of any contributors may be used to endorse or promote products derived
  24  *    from this software without specific prior written permission.
  25  *
  26  * Alternatively, this software may be distributed under the terms of the
  27  * GNU General Public License ("GPL") version 2 as published by the Free
  28  * Software Foundation.


 111 
 112     /* And even then, we are only interested in a few object types */
 113 
 114     Type = AcpiNsGetType (ObjHandle);
 115 
 116     switch (Type)
 117     {
 118     case ACPI_TYPE_REGION:
 119 
 120         Status = AcpiDsInitializeRegion (ObjHandle);
 121         if (ACPI_FAILURE (Status))
 122         {
 123             ACPI_EXCEPTION ((AE_INFO, Status,
 124                 "During Region initialization %p [%4.4s]",
 125                 ObjHandle, AcpiUtGetNodeName (ObjHandle)));
 126         }
 127 
 128         Info->OpRegionCount++;
 129         break;
 130 

 131     case ACPI_TYPE_METHOD:
 132 
 133         Info->MethodCount++;
 134         break;
 135 

 136     case ACPI_TYPE_DEVICE:
 137 
 138         Info->DeviceCount++;
 139         break;
 140 

 141     default:
 142 
 143         break;
 144     }
 145 
 146     /*
 147      * We ignore errors from above, and always return OK, since
 148      * we don't want to abort the walk on a single error.
 149      */
 150     return (AE_OK);
 151 }
 152 
 153 
 154 /*******************************************************************************
 155  *
 156  * FUNCTION:    AcpiDsInitializeObjects
 157  *
 158  * PARAMETERS:  TableDesc       - Descriptor for parent ACPI table
 159  *              StartNode       - Root of subtree to be initialized.
 160  *
 161  * RETURN:      Status
 162  *


 215         ACPI_EXCEPTION ((AE_INFO, Status, "During WalkNamespace"));
 216     }
 217     (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
 218 
 219     Status = AcpiGetTableByIndex (TableIndex, &Table);
 220     if (ACPI_FAILURE (Status))
 221     {
 222         return_ACPI_STATUS (Status);
 223     }
 224 
 225     ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
 226         "\nTable [%4.4s](id %4.4X) - %u Objects with %u Devices %u Methods %u Regions\n",
 227         Table->Signature, OwnerId, Info.ObjectCount,
 228         Info.DeviceCount, Info.MethodCount, Info.OpRegionCount));
 229 
 230     ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
 231         "%u Methods, %u Regions\n", Info.MethodCount, Info.OpRegionCount));
 232 
 233     return_ACPI_STATUS (AE_OK);
 234 }