1. 13 6月, 2009 6 次提交
  2. 25 5月, 2009 1 次提交
    • R
      PM: Do not hold dpm_list_mtx while disabling/enabling nonboot CPUs · 32bdfac5
      Rafael J. Wysocki 提交于
      We shouldn't hold dpm_list_mtx while executing
      [disable|enable]_nonboot_cpus(), because theoretically this may lead
      to a deadlock as shown by the following example (provided by Johannes
      Berg):
      
      CPU 3       CPU 2                     CPU 1
                                            suspend/hibernate
                  something:
                  rtnl_lock()               device_pm_lock()
                                             -> mutex_lock(&dpm_list_mtx)
      
                  mutex_lock(&dpm_list_mtx)
      
      linkwatch_work
       -> rtnl_lock()
                                            disable_nonboot_cpus()
                                             -> flush CPU 3 workqueue
      
      Fortunately, device drivers are supposed to stop any activities that
      might lead to the registration of new device objects way before
      disable_nonboot_cpus() is called, so it shouldn't be necessary to
      hold dpm_list_mtx over the entire late part of device suspend and
      early part of device resume.
      
      Thus, during the late suspend and the early resume of devices acquire
      dpm_list_mtx only when dpm_list is going to be traversed and release
      it right after that.
      
      This patch is reported to fix the regressions tracked as
      http://bugzilla.kernel.org/show_bug.cgi?id=13245.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Reported-by: NMiles Lane <miles.lane@gmail.com>
      Tested-by: NMing Lei <tom.leiming@gmail.com>
      32bdfac5
  3. 16 5月, 2009 1 次提交
  4. 25 4月, 2009 1 次提交
    • R
      PM/Hibernate: Fix waiting for image device to appear on resume · 0c8454f5
      Rafael J. Wysocki 提交于
      Commit c7510859 ("PM/Hibernate: Wait for
      SCSI devices scan to complete during resume") added a call to
      scsi_complete_async_scans() to software_resume(), so that it waited for
      the SCSI scanning to complete, but the call was added at a wrong place.
      
      Namely, it should have been added after wait_for_device_probe(), which
      is called only if the image partition hasn't been specified yet.  Also,
      it's reasonable to check if the image partition is present and only wait
      for the device probing and SCSI scanning to complete if it is not the
      case.
      
      Additionally, since noresume is checked right at the beginning of
      software_resume() and the function returns immediately if it's set, it
      doesn't make sense to check it once again later.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0c8454f5
  5. 20 4月, 2009 1 次提交
    • R
      PM/Suspend: Introduce two new platform callbacks to avoid breakage · 6a7c7eaf
      Rafael J. Wysocki 提交于
      Commit 900af0d9 (PM: Change suspend
      code ordering) changed the ordering of suspend code in such a way
      that the platform .prepare() callback is now executed after the
      device drivers' late suspend callbacks have run.  Unfortunately, this
      turns out to break ARM platforms that need to talk via I2C to power
      control devices during the .prepare() callback.
      
      For this reason introduce two new platform suspend callbacks,
      .prepare_late() and .wake(), that will be called just prior to
      disabling non-boot CPUs and right after bringing them back on line,
      respectively, and use them instead of .prepare() and .finish() for
      ACPI suspend.  Make the PM core execute the .prepare() and .finish()
      platform suspend callbacks where they were executed previously (that
      is, right after calling the regular suspend methods provided by
      device drivers and right before executing their regular resume
      methods, respectively).
      
      It is not necessary to make analogous changes to the hibernation
      code and data structures at the moment, because they are only used
      by ACPI platforms.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Reported-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Acked-by: NLen Brown <len.brown@intel.com>
      6a7c7eaf
  6. 15 4月, 2009 1 次提交
  7. 14 4月, 2009 1 次提交
  8. 01 4月, 2009 2 次提交
  9. 31 3月, 2009 3 次提交
    • R
      PM: Change hibernation code ordering · 4aecd671
      Rafael J. Wysocki 提交于
      Change the ordering of the hibernation core code so that the platform
      "prepare" callbacks are executed and the nonboot CPUs are disabled
      after calling device drivers' "late suspend" methods.
      
      This change (along with the previous analogous change of the suspend
      core code) will allow us to rework the PCI PM core so that the power
      state of devices is changed in the "late" phase of suspend (and
      analogously in the "early" phase of resume), which in turn will allow
      us to avoid the race condition where a device using shared interrupts
      is put into a low power state with interrupts enabled and then an
      interrupt (for another device) comes in and confuses its driver.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      4aecd671
    • R
      PM: Change suspend code ordering · 900af0d9
      Rafael J. Wysocki 提交于
      Change the ordering of the suspend core code so that the platform
      "prepare" callback is executed and the nonboot CPUs are disabled
      after calling device drivers' "late suspend" methods.
      
      This change will allow us to rework the PCI PM core so that the power
      state of devices is changed in the "late" phase of suspend (and
      analogously in the "early" phase of resume), which in turn will allow
      us to avoid the race condition where a device using shared interrupts
      is put into a low power state with interrupts enabled and then an
      interrupt (for another device) comes in and confuses its driver.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      900af0d9
    • R
      PM: Rework handling of interrupts during suspend-resume · 2ed8d2b3
      Rafael J. Wysocki 提交于
      Use the functions introduced in by the previous patch,
      suspend_device_irqs(), resume_device_irqs() and check_wakeup_irqs(),
      to rework the handling of interrupts during suspend (hibernation) and
      resume.  Namely, interrupts will only be disabled on the CPU right
      before suspending sysdevs, while device drivers will be prevented
      from receiving interrupts, with the help of the new helper function,
      before their "late" suspend callbacks run (and analogously during
      resume).
      
      In addition, since the device interrups are now disabled before the
      CPU has turned all interrupts off and the CPU will ACK the interrupts
      setting the IRQ_PENDING bit for them, check in sysdev_suspend() if
      any wake-up interrupts are pending and abort suspend if that's the
      case.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      2ed8d2b3
  10. 30 3月, 2009 1 次提交
  11. 23 2月, 2009 1 次提交
  12. 22 2月, 2009 4 次提交
  13. 19 2月, 2009 1 次提交
  14. 18 2月, 2009 1 次提交
  15. 27 1月, 2009 1 次提交
    • R
      Hibernation: Introduce system_entering_hibernation · abfe2d7b
      Rafael J. Wysocki 提交于
      Introduce boolean function system_entering_hibernation() returning
      'true' during the last phase of hibernation, in which devices are
      being put into low power states and the sleep state (for example,
      ACPI S4) is finally entered.
      
      Some device drivers need such a function to check if the system is
      in the final phase of hibernation.  In particular, some SATA drivers
      are going to use it for blacklisting systems in which the disks
      should not be spun down during the last phase of hibernation (the
      BIOS will do that anyway).
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      abfe2d7b
  16. 17 1月, 2009 2 次提交
  17. 07 1月, 2009 1 次提交
  18. 01 1月, 2009 1 次提交
  19. 19 12月, 2008 5 次提交
  20. 04 12月, 2008 1 次提交
  21. 23 11月, 2008 1 次提交
  22. 19 11月, 2008 1 次提交
  23. 02 11月, 2008 1 次提交
  24. 21 10月, 2008 1 次提交