1. 25 9月, 2010 1 次提交
    • R
      ACPI / ACPICA: Defer enabling of runtime GPEs (v3) · a2100801
      Rafael J. Wysocki 提交于
      The current ACPI GPEs initialization code has a problem that it
      enables some GPEs pointed to by device _PRW methods, generally
      intended for signaling wakeup events (system or device wakeup).
      These GPEs are then almost immediately disabled by the ACPI namespace
      scanning code with the help of acpi_gpe_can_wake(), but it would be
      better not to enable them at all until really necessary.
      
      Modify the initialization of GPEs so that the ones that have
      associated _Lxx or _Exx methods and are not pointed to by any _PRW
      methods will be enabled after the namespace scan is complete.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      a2100801
  2. 07 8月, 2010 1 次提交
    • R
      ACPI / ACPICA: Fix reference counting problems with GPE handlers · 28f4f8a9
      Rafael J. Wysocki 提交于
      If a handler is installed for a GPE associated with an AML method and
      such that it cannot wake up the system from sleep states, the GPE
      remains enabled after the handler has been installed, although it
      should be disabled in that case to avoid spurious execution of the
      handler.
      
      Fix this issue by making acpi_install_gpe_handler() disable GPEs
      that were previously associated with AML methods and cannot wake up
      the system from sleep states.
      
      Analogously, make acpi_remove_gpe_handler() enable the GPEs that
      are associated with AML methods after their handlers have been
      removed and cannot wake up the system from sleep states.  In addition
      to that, fix a code ordering issue in acpi_remove_gpe_handler() that
      renders the locking ineffective (ACPI_MTX_EVENTS is released
      temporarily in the middle of the routine to wait for the completion
      of events already in progress).
      
      For this purpose introduce acpi_raw_disable_gpe() and
      acpi_raw_enable_gpe() to be called with acpi_gbl_gpe_lock held
      and rework acpi_disable_gpe() and acpi_enable_gpe(), respectively, to
      use them.  Also rework acpi_gpe_can_wake() to use
      acpi_raw_disable_gpe() instead of calling acpi_disable_gpe() after
      releasing the lock to avoid the possible theoretical race with
      acpi_install_gpe_handler().
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: "Moore, Robert" <robert.moore@intel.com>
      Cc: Lin Ming <ming.m.lin@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      28f4f8a9
  3. 07 7月, 2010 2 次提交
  4. 12 6月, 2010 1 次提交
    • R
      ACPI / ACPICA: Fix low-level GPE manipulation code · fd247447
      Rafael J. Wysocki 提交于
      ACPICA uses acpi_ev_enable_gpe() for enabling GPEs at the low level,
      which is incorrect, because this function only enables the GPE if the
      corresponding bit in its enable register's enable_for_run mask is set.
      This causes acpi_set_gpe() to work incorrectly if used for enabling
      GPEs that were not previously enabled with acpi_enable_gpe().  As a
      result, among other things, wakeup-only GPEs are never enabled by
      acpi_enable_wakeup_device(), so the devices that use them are unable
      to wake up the system.
      
      To fix this issue remove acpi_ev_enable_gpe() and its counterpart
      acpi_ev_disable_gpe() and replace acpi_hw_low_disable_gpe() with
      acpi_hw_low_set_gpe() that will be used instead to manipulate GPE
      enable bits at the low level.  Make the users of acpi_ev_enable_gpe()
      and acpi_ev_disable_gpe() call acpi_hw_low_set_gpe() instead and
      make sure that GPE enable masks are only updated by acpi_enable_gpe()
      and acpi_disable_gpe() when GPE reference counters change from 0
      to 1 and from 1 to 0, respectively.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      fd247447
  5. 06 5月, 2010 2 次提交
  6. 20 4月, 2010 1 次提交
  7. 25 2月, 2010 1 次提交
    • R
      ACPI: Use GPE reference counting to support shared GPEs · cbbc0de7
      Rafael J. Wysocki 提交于
      To fix a bug and address the reviewers' comments regarding the ACPI
      GPE refcounting patch, do the following additional changes:
      
      o Remove the second argument of acpi_ev_enable_gpe(),
        'write_to_hardware', because it is not necessary any more.
      
      o Add the "bad parameter" test against 'type' in
        acpi_enable_gpe() and acpi_disable_gpe().
      
      o Make acpi_enable_gpe() only check 'status' for runtime GPEs if
        acpi_ev_enable_gpe() was actually called.
      
      o Make acpi_disable_gpe() return 'status' returned by
        acpi_ev_disable_gpe() and fix a bug where ACPI_GPE_TYPE_WAKE
        and ACPI_GPE_TYPE_RUNTIME were exchanged by mistake.
      
      o Add comments explaining why acpi_set_gpe() is used by the ACPI EC
        driver.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      cbbc0de7
  8. 23 2月, 2010 1 次提交
    • R
      ACPI: Use GPE reference counting to support shared GPEs · 9630bdd9
      Rafael J. Wysocki 提交于
      ACPI GPEs may map to multiple devices.  The current GPE interface
      only provides a mechanism for enabling and disabling GPEs, making
      it difficult to change the state of GPEs at runtime without extensive
      cooperation between devices.
      
      Add an API to allow devices to indicate whether or not they want
      their device's GPE to be enabled for both runtime and wakeup events.
      
      Remove the old GPE type handling entirely, which gets rid of various
      quirks, like the implicit disabling with GPE type setting. This
      requires a small amount of rework in order to ensure that non-wake
      GPEs are enabled by default to preserve existing behaviour.
      
      Based on patches from Matthew Garrett <mjg@redhat.com>.
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      9630bdd9
  9. 23 1月, 2010 2 次提交
  10. 27 5月, 2009 1 次提交
  11. 09 1月, 2009 1 次提交
  12. 31 12月, 2008 1 次提交
  13. 24 4月, 2008 1 次提交
  14. 03 2月, 2007 1 次提交
  15. 14 6月, 2006 2 次提交
    • B
      ACPI: ACPICA 20060512 · 958dd242
      Bob Moore 提交于
      Replaced the acpi_os_queue_for_execution() with a new
      interface named acpi_os_execute(). The major difference is
      that the new interface does not have a Priority parameter,
      this appeared to be useless and has been replaced by
      a Type parameter. The Type tells the OS what type of
      execution is being requested, such as global lock handler,
      notify handler, GPE handler, etc. This allows the host
      to queue and execute the request as appropriate for the
      request type, possibly using different work queues and
      different priorities for the various request types. This
      enables fixes for multithreading deadlock problems such as
      http://bugzilla.kernel.org/show_bug.cgi?id=5534
      (Alexey Starikovskiy and Bob Moore)
      
      Fixed a possible memory leak associated with the
      support for the so-called "implicit return" ACPI
      extension. Reported by FreeBSD  (Fiodor Suietov)
      http://bugzilla.kernel.org/show_bug.cgi?id=6514
      
      Fixed a problem with the Load() operator where a table
      load from an operation region could overwrite an internal
      table buffer by up to 7 bytes and cause alignment faults
      on IPF systems. (With assistance from Luming Yu)
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      958dd242
    • B
      [ACPI] ACPICA 20060317 · 61686124
      Bob Moore 提交于
      Implemented the use of a cache object for all internal
      namespace nodes. Since there are about 1000 static nodes
      in a typical system, this will decrease memory use for
      cache implementations that minimize per-allocation overhead
      (such as a slab allocator.)
      
      Removed the reference count mechanism for internal
      namespace nodes, since it was deemed unnecessary. This
      reduces the size of each namespace node by about 5%-10%
      on all platforms. Nodes are now 20 bytes for the 32-bit
      case, and 32 bytes for the 64-bit case.
      
      Optimized several internal data structures to reduce
      object size on 64-bit platforms by packing data within
      the 64-bit alignment. This includes the frequently used
      ACPI_OPERAND_OBJECT, of which there can be ~1000 static
      instances corresponding to the namespace objects.
      
      Added two new strings for the predefined _OSI method:
      "Windows 2001.1 SP1" and "Windows 2006".
      
      Split the allocation tracking mechanism out to a separate
      file, from utalloc.c to uttrack.c. This mechanism appears
      to be only useful for application-level code. Kernels may
      wish to not include uttrack.c in distributions.
      
      Removed all remnants of the obsolete ACPI_REPORT_* macros
      and the associated code. (These macros have been replaced
      by the ACPI_ERROR and ACPI_WARNING macros.)
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      61686124
  16. 20 1月, 2006 1 次提交
    • B
      [ACPI] ACPICA 20060113 · 4a90c7e8
      Bob Moore 提交于
      Added 2006 copyright.
      
      At SuSE's suggestion, enabled all error messages
      without enabling function tracing, ie with CONFIG_ACPI_DEBUG=n
      
      Replaced all instances of the ACPI_DEBUG_PRINT macro invoked at
      the ACPI_DB_ERROR and ACPI_DB_WARN debug levels with
      the ACPI_REPORT_ERROR and ACPI_REPORT_WARNING macros,
      respectively. This preserves all error and warning messages
      in the non-debug version of the ACPICA code (this has been
      referred to as the "debug lite" option.) Over 200 cases
      were converted to create a total of over 380 error/warning
      messages across the ACPICA code. This increases the code
      and data size of the default non-debug version by about 13K.
      Added ACPI_NO_ERROR_MESSAGES flag to enable deleting all messages.
      The size of the debug version remains about the same.
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      4a90c7e8
  17. 10 12月, 2005 1 次提交
    • B
      [ACPI] ACPICA 20051102 · 96db255c
      Bob Moore 提交于
      Modified the subsystem initialization sequence to improve
      GPE support. The GPE initialization has been split into
      two parts in order to defer execution of the _PRW methods
      (Power Resources for Wake) until after the hardware is
      fully initialized and the SCI handler is installed. This
      allows the _PRW methods to access fields protected by the
      Global Lock. This will fix systems where a NO_GLOBAL_LOCK
      exception has been seen during initialization.
      
      Fixed a regression with the ConcatenateResTemplate()
      ASL operator introduced in the 20051021 release.
      
      Implemented support for "local" internal ACPI object
      types within the debugger "Object" command and the
      acpi_walk_namespace() external interfaces. These local
      types include RegionFields, BankFields, IndexFields, Alias,
      and reference objects.
      
      Moved common AML resource handling code into a new file,
      "utresrc.c". This code is shared by both the Resource
      Manager and the AML Debugger.
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      96db255c
  18. 05 8月, 2005 1 次提交
  19. 14 7月, 2005 2 次提交
    • R
      ACPICA 20050617-0624 from Bob Moore <robert.moore@intel.com> · 73459f73
      Robert Moore 提交于
      ACPICA 20050617:
      
      Moved the object cache operations into the OS interface
      layer (OSL) to allow the host OS to handle these operations
      if desired (for example, the Linux OSL will invoke the
      slab allocator).  This support is optional; the compile
      time define ACPI_USE_LOCAL_CACHE may be used to utilize
      the original cache code in the ACPI CA core.  The new OSL
      interfaces are shown below.  See utalloc.c for an example
      implementation, and acpiosxf.h for the exact interface
      definitions.  Thanks to Alexey Starikovskiy.
      	acpi_os_create_cache
      	acpi_os_delete_cache
      	acpi_os_purge_cache
      	acpi_os_acquire_object
      	acpi_os_release_object
      
      Modified the interfaces to acpi_os_acquire_lock and
      acpi_os_release_lock to return and restore a flags
      parameter.  This fits better with many OS lock models.
      Note: the current execution state (interrupt handler
      or not) is no longer passed to these interfaces.  If
      necessary, the OSL must determine this state by itself, a
      simple and fast operation.  Thanks to Alexey Starikovskiy.
      
      Fixed a problem in the ACPI table handling where a valid
      XSDT was assumed present if the revision of the RSDP
      was 2 or greater.  According to the ACPI specification,
      the XSDT is optional in all cases, and the table manager
      therefore now checks for both an RSDP >=2 and a valid
      XSDT pointer.  Otherwise, the RSDT pointer is used.
      Some ACPI 2.0 compliant BIOSs contain only the RSDT.
      
      Fixed an interpreter problem with the Mid() operator in the
      case of an input string where the resulting output string
      is of zero length.  It now correctly returns a valid,
      null terminated string object instead of a string object
      with a null pointer.
      
      Fixed a problem with the control method argument handling
      to allow a store to an Arg object that already contains an
      object of type Device.  The Device object is now correctly
      overwritten.  Previously, an error was returned.
      
      ACPICA 20050624:
      
      Modified the new OSL cache interfaces to use ACPI_CACHE_T
      as the type for the host-defined cache object.  This allows
      the OSL implementation to define and type this object in
      any manner desired, simplifying the OSL implementation.
      For example, ACPI_CACHE_T is defined as kmem_cache_t for
      Linux, and should be defined in the OS-specific header
      file for other operating systems as required.
      
      Changed the interface to AcpiOsAcquireObject to directly
      return the requested object as the function return (instead
      of ACPI_STATUS.) This change was made for performance
      reasons, since this is the purpose of the interface in the
      first place.  acpi_os_acquire_object is now similar to the
      acpi_os_allocate interface.  Thanks to Alexey Starikovskiy.
      
      Modified the initialization sequence in
      acpi_initialize_subsystem to call the OSL interface
      acpi_osl_initialize first, before any local initialization.
      This change was required because the global initialization
      now calls OSL interfaces.
      
      Restructured the code base to split some files because
      of size and/or because the code logically belonged in a
      separate file.  New files are listed below.
      
        utilities/utcache.c	/* Local cache interfaces */
        utilities/utmutex.c	/* Local mutex support */
        utilities/utstate.c	/* State object support */
        parser/psloop.c	/* Main AML parse loop */
      Signed-off-by: NLen Brown <len.brown@intel.com>
      73459f73
    • R
      ACPICA from Bob Moore <robert.moore@intel.com> · 6f42ccf2
      Robert Moore 提交于
      Implemented support for PCI Express root bridges
      -- added support for device PNP0A08 in the root
      bridge search within AcpiEvPciConfigRegionSetup.
      acpi_ev_pci_config_region_setup().
      
      The interpreter now automatically truncates incoming
      64-bit constants to 32 bits if currently executing out
      of a 32-bit ACPI table (Revision < 2). This also affects
      the iASL compiler constant folding. (Note: as per below,
      the iASL compiler no longer allows 64-bit constants within
      32-bit tables.)
      
      Fixed a problem where string and buffer objects with
      "static" pointers (pointers to initialization data within
      an ACPI table) were not handled consistently. The internal
      object copy operation now always copies the data to a newly
      allocated buffer, regardless of whether the source object
      is static or not.
      
      Fixed a problem with the FromBCD operator where an
      implicit result conversion was improperly performed while
      storing the result to the target operand. Since this is an
      "explicit conversion" operator, the implicit conversion
      should never be performed on the output.
      
      Fixed a problem with the CopyObject operator where a copy
      to an existing named object did not always completely
      overwrite the existing object stored at name. Specifically,
      a buffer-to-buffer copy did not delete the existing buffer.
      
      Replaced "interrupt_level" with "interrupt_number" in all
      GPE interfaces and structs for consistency.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      6f42ccf2
  20. 12 7月, 2005 1 次提交
    • R
      ACPICA 20050408 from Bob Moore · 44f6c012
      Robert Moore 提交于
      Fixed three cases in the interpreter where an "index"
      argument to an ASL function was still (internally) 32
      bits instead of the required 64 bits.  This was the Index
      argument to the Index, Mid, and Match operators.
      
      The "strupr" function is now permanently local
      (acpi_ut_strupr), since this is not a POSIX-defined
      function and not present in most kernel-level C
      libraries. References to the C library strupr function
      have been removed from the headers.
      
      Completed the deployment of static
      functions/prototypes. All prototypes with the static
      attribute have been moved from the headers to the owning
      C file.
      
      ACPICA 20050329 from Bob Moore
      
      An error is now generated if an attempt is made to create
      a Buffer Field of length zero (A CreateField with a length
      operand of zero.)
      
      The interpreter now issues a warning whenever executable
      code at the module level is detected during ACPI table
      load. This will give some idea of the prevalence of this
      type of code.
      
      Implemented support for references to named objects (other
      than control methods) within package objects.
      
      Enhanced package object output for the debug
      object. Package objects are now completely dumped, showing
      all elements.
      
      Enhanced miscellaneous object output for the debug
      object. Any object can now be written to the debug object
      (for example, a device object can be written, and the type
      of the object will be displayed.)
      
      The "static" qualifier has been added to all local
      functions across the core subsystem.
      
      The number of "long" lines (> 80 chars) within the source
      has been significantly reduced, by about 1/3.
      
      Cleaned up all header files to ensure that all CA/iASL
      functions are prototyped (even static functions) and the
      formatting is consistent.
      
      Two new header files have been added, acopcode.h and
      acnames.h.
      
      Removed several obsolete functions that were no longer
      used.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      44f6c012
  21. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4