Print this page
acpica-unix2-20130823
PANKOVs restructure

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/io/acpica/utilities/utinit.c
          +++ new/usr/src/common/acpica/components/utilities/utinit.c
   1    1  /******************************************************************************
   2    2   *
   3    3   * Module Name: utinit - Common ACPI subsystem initialization
   4    4   *
   5    5   *****************************************************************************/
   6    6  
   7    7  /*
   8      - * Copyright (C) 2000 - 2011, Intel Corp.
        8 + * Copyright (C) 2000 - 2013, Intel Corp.
   9    9   * All rights reserved.
  10   10   *
  11   11   * Redistribution and use in source and binary forms, with or without
  12   12   * modification, are permitted provided that the following conditions
  13   13   * are met:
  14   14   * 1. Redistributions of source code must retain the above copyright
  15   15   *    notice, this list of conditions, and the following disclaimer,
  16   16   *    without modification.
  17   17   * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  18   18   *    substantially similar to the "NO WARRANTY" disclaimer below
↓ open down ↓ 32 lines elided ↑ open up ↑
  51   51  #include "actables.h"
  52   52  
  53   53  #define _COMPONENT          ACPI_UTILITIES
  54   54          ACPI_MODULE_NAME    ("utinit")
  55   55  
  56   56  /* Local prototypes */
  57   57  
  58   58  static void AcpiUtTerminate (
  59   59      void);
  60   60  
       61 +#if (!ACPI_REDUCED_HARDWARE)
  61   62  
       63 +static void
       64 +AcpiUtFreeGpeLists (
       65 +    void);
       66 +
       67 +#else
       68 +
       69 +#define AcpiUtFreeGpeLists()
       70 +#endif /* !ACPI_REDUCED_HARDWARE */
       71 +
       72 +
       73 +#if (!ACPI_REDUCED_HARDWARE)
  62   74  /******************************************************************************
  63   75   *
  64      - * FUNCTION:    AcpiUtTerminate
       76 + * FUNCTION:    AcpiUtFreeGpeLists
  65   77   *
  66   78   * PARAMETERS:  none
  67   79   *
  68   80   * RETURN:      none
  69   81   *
  70      - * DESCRIPTION: Free global memory
       82 + * DESCRIPTION: Free global GPE lists
  71   83   *
  72   84   ******************************************************************************/
  73   85  
  74   86  static void
  75      -AcpiUtTerminate (
       87 +AcpiUtFreeGpeLists (
  76   88      void)
  77   89  {
  78   90      ACPI_GPE_BLOCK_INFO     *GpeBlock;
  79   91      ACPI_GPE_BLOCK_INFO     *NextGpeBlock;
  80   92      ACPI_GPE_XRUPT_INFO     *GpeXruptInfo;
  81   93      ACPI_GPE_XRUPT_INFO     *NextGpeXruptInfo;
  82   94  
  83   95  
  84      -    ACPI_FUNCTION_TRACE (UtTerminate);
  85      -
  86      -
  87   96      /* Free global GPE blocks and related info structures */
  88   97  
  89   98      GpeXruptInfo = AcpiGbl_GpeXruptListHead;
  90   99      while (GpeXruptInfo)
  91  100      {
  92  101          GpeBlock = GpeXruptInfo->GpeBlockListHead;
  93  102          while (GpeBlock)
  94  103          {
  95  104              NextGpeBlock = GpeBlock->Next;
  96  105              ACPI_FREE (GpeBlock->EventInfo);
  97  106              ACPI_FREE (GpeBlock->RegisterInfo);
  98  107              ACPI_FREE (GpeBlock);
  99  108  
 100  109              GpeBlock = NextGpeBlock;
 101  110          }
 102  111          NextGpeXruptInfo = GpeXruptInfo->Next;
 103  112          ACPI_FREE (GpeXruptInfo);
 104  113          GpeXruptInfo = NextGpeXruptInfo;
 105  114      }
      115 +}
      116 +#endif /* !ACPI_REDUCED_HARDWARE */
 106  117  
      118 +
      119 +/******************************************************************************
      120 + *
      121 + * FUNCTION:    AcpiUtTerminate
      122 + *
      123 + * PARAMETERS:  none
      124 + *
      125 + * RETURN:      none
      126 + *
      127 + * DESCRIPTION: Free global memory
      128 + *
      129 + ******************************************************************************/
      130 +
      131 +static void
      132 +AcpiUtTerminate (
      133 +    void)
      134 +{
      135 +    ACPI_FUNCTION_TRACE (UtTerminate);
      136 +
      137 +    AcpiUtFreeGpeLists ();
      138 +    AcpiUtDeleteAddressLists ();
 107  139      return_VOID;
 108  140  }
 109  141  
 110  142  
 111  143  /*******************************************************************************
 112  144   *
 113  145   * FUNCTION:    AcpiUtSubsystemShutdown
 114  146   *
 115  147   * PARAMETERS:  None
 116  148   *
↓ open down ↓ 32 lines elided ↑ open up ↑
 149  181  
 150  182      /* Close the globals */
 151  183  
 152  184      AcpiUtTerminate ();
 153  185  
 154  186      /* Purge the local caches */
 155  187  
 156  188      (void) AcpiUtDeleteCaches ();
 157  189      return_VOID;
 158  190  }
 159      -
 160      -
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX