1. 20 4月, 2008 5 次提交
    • R
      PM: Remove destroy_suspended_device() · b844eba2
      Rafael J. Wysocki 提交于
      After 2.6.24 there was a plan to make the PM core acquire all device
      semaphores during a suspend/hibernation to protect itself from
      concurrent operations involving device objects.  That proved to be
      too heavy-handed and we found a better way to achieve the goal, but
      before it happened, we had introduced the functions
      device_pm_schedule_removal() and destroy_suspended_device() to allow
      drivers to "safely" destroy a suspended device and we had adapted some
      drivers to use them.  Now that these functions are no longer necessary,
      it seems reasonable to remove them and modify their users to use the
      normal device unregistration instead.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b844eba2
    • A
      PM: Make wakeup flags available whenever CONFIG_PM is set · d288e47c
      Alan Stern 提交于
      The various wakeup flags and their accessor macros in struct
      dev_pm_info should be available whenever CONFIG_PM is enabled, not
      just when CONFIG_PM_SLEEP is on.  Otherwise remote wakeup won't always
      be configurable for runtime power management.  This patch (as1056b)
      fixes the oversight.
      
      David Brownell adds:
      	More accurately, fixes the "regression" ... as noted sometime
      	last summer, after 296699de
      	introduced CONFIG_SUSPEND.  But that didn't make the regression
      	list for that kernel, ergo the delay in fixing it.
      
      [rjw: rebased]
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d288e47c
    • R
      Driver core: Call device_pm_add() after bus_add_device() in device_add() · 57eee3d2
      Rafael J. Wysocki 提交于
      Include dpm_sysfs_add() into device_pm_add(), in analogy with
      device_pm_remove(), and modify device_add() to call the latter after
      bus_add_device(), to avoid situations in which the PM core may
      attempt to suspend a device the registration of which has not been
      successful.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      57eee3d2
    • R
      PM: Handle device registrations during suspend/resume · 58aca232
      Rafael J. Wysocki 提交于
      Modify the PM core to protect its data structures, specifically the
      dpm_active list, from being corrupted if a child of the currently
      suspending device is registered concurrently with its ->suspend()
      callback.  In that case, since the new device (the child) is added
      to dpm_active after its parent, the PM core will attempt to
      suspend it after the parent, which is wrong.
      
      Introduce a new member of struct dev_pm_info, called 'sleeping',
      and use it to check if the parent of the device being added to
      dpm_active has been suspended, in which case the device registration
      fails.  Also, use 'sleeping' for checking if the ordering of devices
      on dpm_active is correct.
      
      Introduce variable 'all_sleeping' that will be set to 'true' once all
      devices have been suspended and make new device registrations fail
      until 'all_sleeping' is reset to 'false', in order to avoid having
      unsuspended devices around while the system is going into a sleep state.
      
      Remove pm_sleep_rwsem which is not necessary any more.
      
      Special thanks to Alan Stern for discussions and suggestions that
      lead to the creation of this patch.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      58aca232
    • P
      power_state: remove it from driver core · 35d313b8
      Pavel Machek 提交于
      power_state is scheduled for removal, and it is used only for debug
      prints by driver core. Remove it.
      Signed-off-by: NPavel Machek <pavel@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      35d313b8
  2. 05 3月, 2008 2 次提交
  3. 22 2月, 2008 2 次提交
  4. 21 2月, 2008 1 次提交
  5. 03 2月, 2008 1 次提交
  6. 02 2月, 2008 1 次提交
  7. 29 1月, 2008 1 次提交
  8. 25 1月, 2008 4 次提交
  9. 29 11月, 2007 1 次提交
  10. 19 10月, 2007 1 次提交
  11. 13 10月, 2007 2 次提交
  12. 30 7月, 2007 1 次提交
    • R
      Introduce CONFIG_SUSPEND for suspend-to-Ram and standby · 296699de
      Rafael J. Wysocki 提交于
      Introduce CONFIG_SUSPEND representing the ability to enter system sleep
      states, such as the ACPI S3 state, and allow the user to choose SUSPEND
      and HIBERNATION independently of each other.
      
      Make HOTPLUG_CPU be selected automatically if SUSPEND or HIBERNATION has
      been chosen and the kernel is intended for SMP systems.
      
      Also, introduce CONFIG_PM_SLEEP which is automatically selected if
      CONFIG_SUSPEND or CONFIG_HIBERNATION is set and use it to select the
      code needed for both suspend and hibernation.
      
      The top-level power management headers and the ACPI code related to
      suspend and hibernation are modified to use the new definitions (the
      changes in drivers/acpi/sleep/main.c are, mostly, moving code to reduce
      the number of ifdefs).
      
      There are many other files in which CONFIG_PM can be replaced with
      CONFIG_PM_SLEEP or even with CONFIG_SUSPEND, but they can be updated in
      the future.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      296699de
  13. 27 7月, 2007 1 次提交
  14. 22 7月, 2007 1 次提交
  15. 20 7月, 2007 1 次提交
  16. 19 7月, 2007 2 次提交
  17. 12 7月, 2007 6 次提交
  18. 03 5月, 2007 1 次提交
  19. 28 4月, 2007 3 次提交
  20. 12 4月, 2007 1 次提交
  21. 26 9月, 2006 2 次提交