1. 13 2月, 2013 2 次提交
  2. 01 2月, 2013 1 次提交
  3. 30 1月, 2013 3 次提交
  4. 29 1月, 2013 1 次提交
  5. 28 1月, 2013 1 次提交
  6. 26 1月, 2013 2 次提交
  7. 24 1月, 2013 4 次提交
  8. 20 1月, 2013 1 次提交
    • M
      ACPI: add support for CSRT table · 13176bbf
      Mika Westerberg 提交于
      Core System Resources Table (CSRT) is a proprietary ACPI table that
      contains resources for certain devices that are not found in the DSDT
      table. Typically a shared DMA controller might be found here.
      
      This patch adds support for this table. We go through all entries in the
      table and make platform devices of them. The resources from the table are
      passed with the platform device.
      
      There is one special resource in the table and it is the DMA request line
      base and number of request lines. This information might be needed by the
      DMA controller driver as it needs to map the ACPI DMA request line number
      to the actual request line understood by the hardware. This range is passed
      as IORESOURCE_DMA resource.
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      13176bbf
  9. 19 1月, 2013 1 次提交
    • R
      ACPI / scan: Drop acpi_bus_add() and use acpi_bus_scan() instead · b8bd759a
      Rafael J. Wysocki 提交于
      The only difference between acpi_bus_scan() and acpi_bus_add() is the
      invocation of acpi_update_all_gpes() in the latter which in fact is
      unnecessary, because acpi_update_all_gpes() has already been called
      by acpi_scan_init() and the way it is implemented guarantees the next
      invocations of it to do nothing.
      
      For this reason, drop acpi_bus_add() and make all its callers use
      acpi_bus_scan() directly instead of it.  Additionally, rearrange the
      code in acpi_scan_init() slightly to improve the visibility of the
      acpi_update_all_gpes() call in there.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NYinghai Lu <yinghai@kernel.org>
      b8bd759a
  10. 17 1月, 2013 11 次提交
    • R
      ACPI: Use system level attribute of wakeup power resources · 0596a52b
      Rafael J. Wysocki 提交于
      The system level attribute of ACPI power resources is the lowest
      system sleep level (S0, S2 etc.) in which the given resource can be
      "on" (ACPI 5.0, Section 7.1).  On the other hand, wakeup power
      resources have to be "on" for devices depending on them to be able to
      signal wakeup.  Therefore devices cannot wake up the system from
      sleep states higher than the minimum of the system level attributes
      of their wakeup power resources.
      
      Use the wakeup power resources' system level values to get the
      deepest system sleep state (highest system sleep level) the given
      device can wake up the system from.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0596a52b
    • R
      ACPI: Take power resource initialization errors into account · e88c9c60
      Rafael J. Wysocki 提交于
      Some ACPI power resource initialization errors, like memory
      allocation errors, are not taken into account appropriately in some
      cases, which may lead to a device having an incomplete list of power
      resources that one of its power states depends on, for one example.
      
      Rework the power resource initialization and namespace scanning code
      so that power resource initialization errors are treated more
      seriously.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e88c9c60
    • R
      ACPI / scan: Consolidate extraction of power resources lists · ef85bdbe
      Rafael J. Wysocki 提交于
      The lists of ACPI power resources are currently extracted in two
      different ways, one for wakeup power resources and one for power
      resources that device power states depend on.  There is no reason
      why it should be done differently in those two cases, so introduce
      a common routine for extracting power resources lists from data
      returned by AML, acpi_extract_power_resources(), and make the
      namespace scanning code use it for both wakeup and device power
      states power resources.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      ef85bdbe
    • R
      ACPI / scan: Remove unnecessary initialization of local variables · 8bc5053b
      Rafael J. Wysocki 提交于
      The local variables in acpi_bus_get_power_flags() need not be
      initialized upfront, so change the code accordingly.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8bc5053b
    • R
      ACPI / scan: Move power state initialization to a separate routine · f33ce568
      Rafael J. Wysocki 提交于
      To reduce indentation level and improve code readability, move the
      initialization code related to device power states from
      acpi_bus_get_power_flags() to a new routine,
      acpi_bus_init_power_state().
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      f33ce568
    • R
      ACPI / PM: Take order attribute of wakeup power resources into account · 993cbe59
      Rafael J. Wysocki 提交于
      ACPI power resources have an order attribute that should be taken
      into account when turning them on and off, but it is not used now.
      
      Modify the power resources management code to preserve the
      spec-compliant ordering of wakeup power resources.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      993cbe59
    • R
      ACPI / PM: Take order attribute of power resources into account · 0b224527
      Rafael J. Wysocki 提交于
      ACPI power resources have an order attribute that should be taken
      into account when turning them on and off, but it is not used now.
      
      Modify the power resources management code to preserve the
      spec-compliant ordering of power resources that power states of
      devices depend on (analogous changes will be done separately for
      power resources used for wakeup).
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0b224527
    • R
      ACPI: Drop power resources driver · 781d737c
      Rafael J. Wysocki 提交于
      The ACPI power resources driver is not very useful, because the only
      thing it really does is to restore the state of the power resources
      that were "on" before system suspend or hibernation, but that may be
      achieved in a different way.
      
      Drop the ACPI power resources driver entirely and add
      acpi_resume_power_resources() that will walk the list of all
      registered power resources during system resume and turn on the ones
      that were "on" before the preceding system suspend or hibernation.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      781d737c
    • R
      ACPI / scan: Treat power resources in a special way · 82c7d5ef
      Rafael J. Wysocki 提交于
      ACPI power resources need to be treated in a special way by the
      namespace scanning code, because they need to be ready to use as
      soon as they have been discovered (even before registering ACPI
      device nodes using them for power management).
      
      For this reason, it doesn't make sense to separate the preparation
      of struct acpi_device objects representing them in the device
      hierarchy from the creation of struct acpi_power_resource objects
      actually used for power resource manipulation.  Accordingly, it
      doesn't make sense to define non-empty .add() and .remove() callbacks
      in the power resources "driver" (in fact, it is questionable whether
      or not it is useful to register such a "driver" at all).
      
      Rearrange the code in scan.c and power.c so that power resources are
      initialized entirely by one routine, acpi_add_power_resource(), that
      also prepares their struct acpi_device objects and registers them
      with the driver core, telling it to use a special release routine,
      acpi_release_power_resource(), for removing objects that represent
      power resources from memory.  Make the ACPI namespace scanning code
      in scan.c always use acpi_add_power_resource() for preparing and
      registering objects that represent power resources.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      82c7d5ef
    • R
      ACPI / scan: More straightforward preparation of ACPI device objects · d43e167d
      Rafael J. Wysocki 提交于
      Simplify the code preparing struct acpi_device objects for
      registration by removing useless code, moving different pieces of
      code into the functions they belong to and making a couple of int
      functions always returning 0 void.
      
      This also fixes a possible memory leak in ACPI device registration
      error code path by making acpi_device_register() detach data from
      device->handle if device_register() fails and prepares the scanning
      code for special-casing ACPI power resources (next patch).
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      d43e167d
    • R
      ACPI / PM: Rework the handling of devices depending on power resources · bc9b6407
      Rafael J. Wysocki 提交于
      Commit 0090def6 (ACPI: Add interface to register/unregister device
      to/from power resources) made it possible to indicate to the ACPI
      core that if the given device depends on any power resources, then
      it should be resumed as soon as all of the power resources required
      by it to transition to the D0 power state have been turned on.
      
      Unfortunately, however, this was a mistake, because all devices
      depending on power resources should be treated this way (i.e. they
      should be resumed when all power resources required by their D0
      state have been turned on) and for the majority of those devices
      the ACPI core can figure out by itself which (physical) devices
      depend on what power resources.
      
      For this reason, replace the code added by commit 0090def6 with a
      new, much more straightforward, mechanism that will be used
      internally by the ACPI core and remove all references to that code
      from kernel subsystems using ACPI.
      
      For the cases when there are (physical) devices that should be
      resumed whenever a not directly related ACPI device node goes into
      D0 as a result of power resources configuration changes, like in
      the SATA case, add two new routines, acpi_dev_pm_add_dependent()
      and acpi_dev_pm_remove_dependent(), allowing subsystems to manage
      such dependencies.  Convert the SATA subsystem to use the new
      functions accordingly.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      bc9b6407
  11. 15 1月, 2013 5 次提交
  12. 12 1月, 2013 1 次提交
  13. 08 1月, 2013 1 次提交
    • R
      ACPI / scan: Treat power resources in a special way · f95988de
      Rafael J. Wysocki 提交于
      Commit 805d410f (ACPI: Separate adding ACPI device objects from
      probing ACPI drivers) introduced an ACPI power resources management
      regression, because it didn't ensure that the power resources
      driver bind to the struct acpi_device objects corresponding
      to power resources as soon as they were created.  As a result,
      ACPI power management routines may attempt to access power resource
      objects before they are ready to use.
      
      To fix this problem, tell the acpi_add_single_object() in
      acpi_bus_check_add() to probe the driver for objects of type
      ACPI_BUS_TYPE_POWER.  This fix has been verified to work on
      HP nx6325 where the problem was first observed.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NToshi Kani <toshi.kani@hp.com>
      f95988de
  14. 05 1月, 2013 1 次提交
  15. 03 1月, 2013 5 次提交