1. 12 7月, 2011 3 次提交
    • R
      PM / Domains: Do not execute device callbacks under locks · 17b75eca
      Rafael J. Wysocki 提交于
      Currently, the .start_device() and .stop_device() callbacks from
      struct generic_pm_domain() as well as the device drivers' runtime PM
      callbacks used by the generic PM domains code are executed under
      the generic PM domain lock.  This, unfortunately, is prone to
      deadlocks, for example if a device and its parent are boths members
      of the same PM domain.  For this reason, it would be better if the
      PM domains code didn't execute device callbacks under the lock.
      
      Rework the locking in the generic PM domains code so that the lock
      is dropped for the execution of device callbacks.  To this end,
      introduce PM domains states reflecting the current status of a PM
      domain and such that the PM domain lock cannot be acquired if the
      status is GPD_STATE_BUSY.  Make threads attempting to acquire a PM
      domain's lock wait until the status changes to either
      GPD_STATE_ACTIVE or GPD_STATE_POWER_OFF.
      
      This change by itself doesn't fix the deadlock problem mentioned
      above, but the mechanism introduced by it will be used for for this
      purpose by a subsequent patch.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      17b75eca
    • R
      PM / Domains: Make failing pm_genpd_prepare() clean up properly · b6c10c84
      Rafael J. Wysocki 提交于
      If pm_generic_prepare() in pm_genpd_prepare() returns error code,
      the PM domains counter of "prepared" devices should be decremented
      and its suspend_power_off flag should be reset if this counter drops
      down to zero.  Otherwise, the PM domain runtime PM code will not
      handle the domain correctly (it will permanently think that system
      suspend is in progress).
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      b6c10c84
    • R
      PM / Domains: Set device state to "active" during system resume · 6f00ff78
      Rafael J. Wysocki 提交于
      The runtime PM status of devices in a power domain that is not
      powered off in pm_genpd_complete() should be set to "active", because
      those devices are operational at this point.  Some of them may not be
      in use, though, so make pm_genpd_complete() call pm_runtime_idle()
      in addition to pm_runtime_set_active() for each of them.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      6f00ff78
  2. 10 7月, 2011 7 次提交
  3. 02 7月, 2011 20 次提交
  4. 01 7月, 2011 7 次提交
  5. 30 6月, 2011 3 次提交