1. 25 Aug, 2011 6 commits
    • Rafael J. Wysocki's avatar
      PM / Domains: Add "wait for parent" status for generic PM domains · 3f241775
      Rafael J. Wysocki authored
      The next patch will make it possible for a generic PM domain to have
      multiple parents (i.e. multiple PM domains it depends on).  To
      prepare for that change it is necessary to change pm_genpd_poweron()
      so that it doesn't jump to the start label after running itself
      recursively for the parent domain.  For this purpose, introduce a new
      PM domain status value GPD_STATE_WAIT_PARENT that will be set by
      pm_genpd_poweron() before calling itself recursively for the parent
      domain and modify the code in drivers/base/power/domain.c so that
      the GPD_STATE_WAIT_PARENT status is guaranteed to be preserved during
      the execution of pm_genpd_poweron() for the parent.
      
      This change also causes pm_genpd_add_subdomain() and
      pm_genpd_remove_subdomain() to wait for started pm_genpd_poweron() to
      complete and allows pm_genpd_runtime_resume() to avoid dropping the
      lock after powering on the PM domain.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      3f241775
    • Rafael J. Wysocki's avatar
      PM / Domains: Make pm_genpd_poweron() always survive parent removal · 9e08cf42
      Rafael J. Wysocki authored
      If pm_genpd_remove_subdomain() is called to remove a PM domain's
      subdomain and pm_genpd_poweron() is called for that subdomain at
      the same time, and the pm_genpd_poweron() called by it recursively
      for the parent returns an error, the first pm_genpd_poweron()'s
      error code path will attempt to decrement the subdomain counter of
      a PM domain that it's not a subdomain of any more.
      
      Rearrange the code in pm_genpd_poweron() to prevent this from
      happening.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      9e08cf42
    • Rafael J. Wysocki's avatar
      PM / Domains: Do not take parent locks to modify subdomain counters · 3c07cbc4
      Rafael J. Wysocki authored
      After the subdomain counter in struct generic_pm_domain has been
      changed into an atomic_t field, it is possible to modify
      pm_genpd_poweron() and pm_genpd_poweroff() so that they don't take
      the parents locks.  This requires pm_genpd_poweron() to increment
      the parent's subdomain counter before calling itself recursively
      for the parent and to decrement it if an error is to be returned.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      3c07cbc4
    • Rafael J. Wysocki's avatar
      PM / Domains: Implement subdomain counters as atomic fields · c4bb3160
      Rafael J. Wysocki authored
      Currently, pm_genpd_poweron() and pm_genpd_poweroff() need to take
      the parent PM domain's lock in order to modify the parent's counter
      of active subdomains in a nonracy way.  This causes the locking to be
      considerably complex and in fact is not necessary, because the
      subdomain counters may be implemented as atomic fields and they
      won't have to be modified under a lock.
      
      Replace the unsigned in sd_count field in struct generic_pm_domain
      by an atomic_t one and modify the code in drivers/base/power/domain.c
      to take this change into account.
      
      This patch doesn't change the locking yet, that is going to be done
      in a separate subsequent patch.
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      c4bb3160
    • Kevin Hilman's avatar
      OMAP: omap_device: only override _noirq methods, not normal suspend/resume · ff35336d
      Kevin Hilman authored
      Commit c03f007a (OMAP: PM:
      omap_device: add system PM methods for PM domain handling) mistakenly
      used SET_SYSTEM_SLEEP_PM_OPS() when trying to configure custom methods
      for the PM domains noirq methods.  Fix that by setting only the
      suspend_noirq and resume_noirq methods with custom versions.
      
      Note that all other PM domain methods (including the "normal"
      suspend/resume methods) are populated using USE_PLATFORM_PM_SLEEP_OPS,
      which configures them all to the default subsystem (platform_bus)
      methods.
      Reported-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      Tested-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      ff35336d
    • Rafael J. Wysocki's avatar
      PM / Runtime: Correct documentation of pm_runtime_irq_safe() · 64584eb9
      Rafael J. Wysocki authored
      The description of pm_runtime_irq_safe() has to be updated to follow
      the code after commit 02b26774 (PM / Runtime: Allow _put_sync() from
      interrupts-disabled context).
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: default avatarKevin Hilman <khilman@ti.com>
      64584eb9
  2. 24 Aug, 2011 11 commits
  3. 23 Aug, 2011 16 commits
  4. 22 Aug, 2011 7 commits