Print this page
acpica-unix2-20130823
PANKOVs restructure

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/io/acpica/events/evglock.c
          +++ new/usr/src/common/acpica/components/events/evglock.c
   1    1  /******************************************************************************
   2    2   *
   3    3   * Module Name: evglock - Global Lock support
   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 ↓ 23 lines elided ↑ open up ↑
  42   42   */
  43   43  
  44   44  #include "acpi.h"
  45   45  #include "accommon.h"
  46   46  #include "acevents.h"
  47   47  #include "acinterp.h"
  48   48  
  49   49  #define _COMPONENT          ACPI_EVENTS
  50   50          ACPI_MODULE_NAME    ("evglock")
  51   51  
       52 +#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
  52   53  
  53   54  /* Local prototypes */
  54   55  
  55   56  static UINT32
  56   57  AcpiEvGlobalLockHandler (
  57   58      void                    *Context);
  58   59  
  59   60  
  60   61  /*******************************************************************************
  61   62   *
↓ open down ↓ 10 lines elided ↑ open up ↑
  72   73  ACPI_STATUS
  73   74  AcpiEvInitGlobalLockHandler (
  74   75      void)
  75   76  {
  76   77      ACPI_STATUS             Status;
  77   78  
  78   79  
  79   80      ACPI_FUNCTION_TRACE (EvInitGlobalLockHandler);
  80   81  
  81   82  
       83 +    /* If Hardware Reduced flag is set, there is no global lock */
       84 +
       85 +    if (AcpiGbl_ReducedHardware)
       86 +    {
       87 +        return_ACPI_STATUS (AE_OK);
       88 +    }
       89 +
  82   90      /* Attempt installation of the global lock handler */
  83   91  
  84   92      Status = AcpiInstallFixedEventHandler (ACPI_EVENT_GLOBAL,
  85   93                  AcpiEvGlobalLockHandler, NULL);
  86   94  
  87   95      /*
  88   96       * If the global lock does not exist on this platform, the attempt to
  89   97       * enable GBL_STATUS will fail (the GBL_ENABLE bit will not stick).
  90   98       * Map to AE_OK, but mark global lock as not present. Any attempt to
  91   99       * actually use the global lock will be flagged with an error.
↓ open down ↓ 37 lines elided ↑ open up ↑
 129  137  {
 130  138      ACPI_STATUS             Status;
 131  139  
 132  140  
 133  141      ACPI_FUNCTION_TRACE (EvRemoveGlobalLockHandler);
 134  142  
 135  143      AcpiGbl_GlobalLockPresent = FALSE;
 136  144      Status = AcpiRemoveFixedEventHandler (ACPI_EVENT_GLOBAL,
 137  145                  AcpiEvGlobalLockHandler);
 138  146  
      147 +    AcpiOsDeleteLock (AcpiGbl_GlobalLockPendingLock);
 139  148      return_ACPI_STATUS (Status);
 140  149  }
 141  150  
 142  151  
 143  152  /*******************************************************************************
 144  153   *
 145  154   * FUNCTION:    AcpiEvGlobalLockHandler
 146  155   *
 147  156   * PARAMETERS:  Context         - From thread interface, not used
 148  157   *
↓ open down ↓ 209 lines elided ↑ open up ↑
 358  367          ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Released hardware Global Lock\n"));
 359  368      }
 360  369  
 361  370      AcpiGbl_GlobalLockAcquired = FALSE;
 362  371  
 363  372      /* Release the local GL mutex */
 364  373  
 365  374      AcpiOsReleaseMutex (AcpiGbl_GlobalLockMutex->Mutex.OsMutex);
 366  375      return_ACPI_STATUS (Status);
 367  376  }
      377 +
      378 +#endif /* !ACPI_REDUCED_HARDWARE */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX