This project is mirrored from https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git. Pull mirroring updated .
  1. 03 Jul, 2012 4 commits
    • Rafael J. Wysocki's avatar
      PM / Domains: Add preliminary support for cpuidle, v2 · cbc9ef02
      Rafael J. Wysocki authored
      
      
      On some systems there are CPU cores located in the same power
      domains as I/O devices.  Then, power can only be removed from the
      domain if all I/O devices in it are not in use and the CPU core
      is idle.  Add preliminary support for that to the generic PM domains
      framework.
      
      First, the platform is expected to provide a cpuidle driver with one
      extra state designated for use with the generic PM domains code.
      This state should be initially disabled and its exit_latency value
      should be set to whatever time is needed to bring up the CPU core
      itself after restoring power to it, not including the domain's
      power on latency.  Its .enter() callback should point to a procedure
      that will remove power from the domain containing the CPU core at
      the end of the CPU power transition.
      
      The remaining characteristics of the extra cpuidle state, referred to
      as the "domain" cpuidle state below, (e.g. power usage, target
      residency) should be populated in accordance with the properties of
      the hardware.
      
      Next, the platform should execute genpd_attach_cpuidle() on the PM
      domain containing the CPU core.  That will cause the generic PM
      domains framework to treat that domain in a special way such that:
      
       * When all devices in the domain have been suspended and it is about
         to be turned off, the states of the devices will be saved, but
         power will not be removed from the domain.  Instead, the "domain"
         cpuidle state will be enabled so that power can be removed from
         the domain when the CPU core is idle and the state has been chosen
         as the target by the cpuidle governor.
      
       * When the first I/O device in the domain is resumed and
         __pm_genpd_poweron(() is called for the first time after
         power has been removed from the domain, the "domain" cpuidle
         state will be disabled to avoid subsequent surprise power removals
         via cpuidle.
      
      The effective exit_latency value of the "domain" cpuidle state
      depends on the time needed to bring up the CPU core itself after
      restoring power to it as well as on the power on latency of the
      domain containing the CPU core.  Thus the "domain" cpuidle state's
      exit_latency has to be recomputed every time the domain's power on
      latency is updated, which may happen every time power is restored
      to the domain, if the measured power on latency is greater than
      the latency stored in the corresponding generic_pm_domain structure.
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      Reviewed-by: default avatarKevin Hilman <khilman@ti.com>
      cbc9ef02
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpuidle' into pm-domains · e3b8cdd8
      Rafael J. Wysocki authored
      * pm-cpuidle:
        PM / cpuidle: Add driver reference counter
        cpuidle: move field disable from per-driver to per-cpu
      e3b8cdd8
    • Rafael J. Wysocki's avatar
      PM / cpuidle: Add driver reference counter · 6e797a07
      Rafael J. Wysocki authored
      
      
      Add a reference counter for the cpuidle driver, so that it can't
      be unregistered when it is in use.
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      6e797a07
    • ShuoX Liu's avatar
      cpuidle: move field disable from per-driver to per-cpu · dc7fd275
      ShuoX Liu authored
      
      
      Andrew J.Schorr raises a question.  When he changes the disable setting on
      a single CPU, it affects all the other CPUs.  Basically, currently, the
      disable field is per-driver instead of per-cpu.  All the C states of the
      same driver are shared by all CPU in the same machine.
      
      The patch changes the `disable' field to per-cpu, so we could set this
      separately for each cpu.
      
      Signed-off-by: default avatarShuoX Liu <shuox.liu@intel.com>
      Reported-by: default avatarAndrew J.Schorr <aschorr@telemetry-investments.com>
      Reviewed-by: default avatarYanmin Zhang <yanmin_zhang@intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      dc7fd275
  2. 01 Jul, 2012 2 commits
    • Rafael J. Wysocki's avatar
      PM / Domains: Do not stop devices after restoring their states · 80de3d7f
      Rafael J. Wysocki authored
      
      
      While resuming a device belonging to a PM domain,
      pm_genpd_runtime_resume() calls __pm_genpd_restore_device() to
      restore its state, if necessary.  The latter starts the device,
      using genpd_start_dev(), restores its state, using
      genpd_restore_dev(), and then stops it, using genpd_stop_dev().
      However, this last operation is not necessary, because the
      device is supposed to be operational after pm_genpd_runtime_resume()
      has returned and because of it pm_genpd_runtime_resume() has to
      call genpd_start_dev() once again for the "restored" device, which
      is inefficient.
      
      To make things more efficient, remove the call to genpd_stop_dev()
      from __pm_genpd_restore_device() and the direct call to
      genpd_start_dev() from pm_genpd_runtime_resume().  [Of course,
      genpd_start_dev() still has to be called by it for devices with the
      power.irq_safe flag set, because __pm_genpd_restore_device() is not
      executed for them.]
      
      This change has been tested on the SH7372 Mackerel board.
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      80de3d7f
    • Rafael J. Wysocki's avatar
      PM / Domains: Use subsystem runtime suspend/resume callbacks by default · 0b589741
      Rafael J. Wysocki authored
      
      
      Currently, the default "save state" and "restore state" routines
      for generic PM domains, pm_genpd_default_save_state() and
      pm_genpd_default_restore_state(), respectively, only use runtime PM
      callbacks provided by device drivers, but in general those callbacks
      need not provide the entire necessary functionality.  Namely, in
      general it may be necessary to execute subsystem (i.e. device type,
      device class or bus type) callbacks that will carry out all of the
      necessary operations.
      
      For this reason, modify pm_genpd_default_save_state() and
      pm_genpd_default_restore_state() to execute subsystem callbacks,
      if they are provided, and fall back to driver callbacks otherwise.
      
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      0b589741
  3. 30 Jun, 2012 13 commits
  4. 29 Jun, 2012 13 commits
  5. 28 Jun, 2012 8 commits