1. 26 Feb, 2010 8 commits
    • Rafael J. Wysocki's avatar
      PM: Add facility for advanced testing of async suspend/resume · 5a2eb858
      Rafael J. Wysocki authored
      Add configuration switch CONFIG_PM_ADVANCED_DEBUG for compiling in
      extra PM debugging/testing code allowing one to access some
      PM-related attributes of devices from the user space via sysfs.
      
      If CONFIG_PM_ADVANCED_DEBUG is set, add sysfs attribute power/async
      for every device allowing the user space to access the device's
      power.async_suspend flag and modify it, if desired.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      5a2eb858
    • Rafael J. Wysocki's avatar
      PM: Add a switch for disabling/enabling asynchronous suspend/resume · 0e06b4a8
      Rafael J. Wysocki authored
      Add sysfs attribute /sys/power/pm_async allowing the user space to
      disable/enable asynchronous suspend/resume of devices.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      0e06b4a8
    • Rafael J. Wysocki's avatar
      PM: Asynchronous suspend and resume of devices · 5af84b82
      Rafael J. Wysocki authored
      Theoretically, the total time of system sleep transitions (suspend
      to RAM, hibernation) can be reduced by running suspend and resume
      callbacks of device drivers in parallel with each other.  However,
      there are dependencies between devices such that we're not allowed
      to suspend the parent of a device before suspending the device
      itself.  Analogously, we're not allowed to resume a device before
      resuming its parent.
      
      The most straightforward way to take these dependencies into accout
      is to start the async threads used for suspending and resuming
      devices at the core level, so that async_schedule() is called for
      each suspend and resume callback supposed to be executed
      asynchronously.
      
      For this purpose, introduce a new device flag, power.async_suspend,
      used to mark the devices whose suspend and resume callbacks are to be
      executed asynchronously (ie. in parallel with the main suspend/resume
      thread and possibly in parallel with each other) and helper function
      device_enable_async_suspend() allowing one to set power.async_suspend
      for given device (power.async_suspend is unset by default for all
      devices).  For each device with the power.async_suspend flag set the
      PM core will use async_schedule() to execute its suspend and resume
      callbacks.
      
      The async threads started for different devices as a result of
      calling async_schedule() are synchronized with each other and with
      the main suspend/resume thread with the help of completions, in the
      following way:
      (1) There is a completion, power.completion, for each device object.
      (2) Each device's completion is reset before calling async_schedule()
          for the device or, in the case of devices with the
          power.async_suspend flags unset, before executing the device's
          suspend and resume callbacks.
      (3) During suspend, right before running the bus type, device type
          and device class suspend callbacks for the device, the PM core
          waits for the completions of all the device's children to be
          completed.
      (4) During resume, right before running the bus type, device type and
          device class resume callbacks for the device, the PM core waits
          for the completion of the device's parent to be completed.
      (5) The PM core completes power.completion for each device right
          after the bus type, device type and device class suspend (or
          resume) callbacks executed for the device have returned.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      5af84b82
    • Rafael J. Wysocki's avatar
      PM: Add parent information to timing messages · 8cc6b39f
      Rafael J. Wysocki authored
      Add parent information to the messages printed by the suspend/resume
      core when initcall_debug is set.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      8cc6b39f
    • Rafael J. Wysocki's avatar
      PM: Document device power attributes in sysfs · 971cb7fb
      Rafael J. Wysocki authored
      There are sysfs attributes in /sys/devices/.../power/ that haven't
      been documented yet in Documentation/ABI/.  Document them as
      appropriate.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      971cb7fb
    • Rafael J. Wysocki's avatar
      PM / Runtime: Add sysfs switch for disabling device run-time PM · 53823639
      Rafael J. Wysocki authored
      Add new device sysfs attribute, power/control, allowing the user
      space to block the run-time power management of the devices.  If this
      attribute is set to "on", the driver of the device won't be able to power
      manage it at run time (without breaking the rules) and the device will
      always be in the full power state (except when the entire system goes
      into a sleep state).
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      53823639
    • Linus Torvalds's avatar
      Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 · 68c6b859
      Linus Torvalds authored
      * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (48 commits)
        x86/PCI: Prevent mmconfig memory corruption
        ACPI: Use GPE reference counting to support shared GPEs
        x86/PCI: use host bridge _CRS info by default on 2008 and newer machines
        PCI: augment bus resource table with a list
        PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs
        PCI: read bridge windows before filling in subtractive decode resources
        PCI: split up pci_read_bridge_bases()
        PCIe PME: use pci_pcie_cap()
        PCI PM: Run-time callbacks for PCI bus type
        PCIe PME: use pci_is_pcie()
        PCI / ACPI / PM: Platform support for PCI PME wake-up
        ACPI / ACPICA: Multiple system notify handlers per device
        ACPI / PM: Add more run-time wake-up fields
        ACPI: Use GPE reference counting to support shared GPEs
        PCI PM: Make it possible to force using INTx for PCIe PME signaling
        PCI PM: PCIe PME root port service driver
        PCI PM: Add function for checking PME status of devices
        PCI: mark is_pcie obsolete
        PCI: set PCI_PREF_RANGE_TYPE_64 in pci_bridge_check_ranges
        PCI: pciehp: second try to get big range for pcie devices
        ...
      68c6b859
    • Linus Torvalds's avatar
      Lower USB storage settling delay to something more reasonable · a4a47bc0
      Linus Torvalds authored
      The five-second delay can be rather annoying, and makes the system
      appear much less responsive when you connect a USB drive.
      
      It's also not entirely clear that it is needed - the settling delay has
      at least historically been an issue on some Apple iPods, for example,
      and some devices have been reported to need even more than the old 5s
      delay.
      
      But before we penalize them all, let's see how bad it really is.  Some
      of the reasons for long delays seem to be actual historical kernel bugs
      that should probably never have been papered over with a delay in the
      first place (there's a Ubuntu bug report for 2.6.20 about a NULL pointer
      dereference unless 'delay_use' is 8 or more, for example).
      
      It also looks like some distros have already shipped with delay_use=0,
      so the five second default may well be totally historical.
      
      In other words: "Let's see if anybody screams".
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a4a47bc0
  2. 25 Feb, 2010 12 commits
  3. 24 Feb, 2010 20 commits