1. 13 11月, 2014 1 次提交
    • D
      cpuidle: Invert CPUIDLE_FLAG_TIME_VALID logic · b82b6cca
      Daniel Lezcano 提交于
      The only place where the time is invalid is when the ACPI_CSTATE_FFH entry
      method is not set. Otherwise for all the drivers, the time can be correctly
      measured.
      
      Instead of duplicating the CPUIDLE_FLAG_TIME_VALID flag in all the drivers
      for all the states, just invert the logic by replacing it by the flag
      CPUIDLE_FLAG_TIME_INVALID, hence we can set this flag only for the acpi idle
      driver, remove the former flag from all the drivers and invert the logic with
      this flag in the different governor.
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b82b6cca
  2. 24 10月, 2014 1 次提交
  3. 21 10月, 2014 1 次提交
  4. 25 9月, 2014 5 次提交
  5. 24 9月, 2014 1 次提交
    • D
      sched: Let the scheduler see CPU idle states · 442bf3aa
      Daniel Lezcano 提交于
      When the cpu enters idle, it stores the cpuidle state pointer in its
      struct rq instance which in turn could be used to make a better decision
      when balancing tasks.
      
      As soon as the cpu exits its idle state, the struct rq reference is
      cleared.
      
      There are a couple of situations where the idle state pointer could be changed
      while it is being consulted:
      
      1. For x86/acpi with dynamic c-states, when a laptop switches from battery
         to AC that could result on removing the deeper idle state. The acpi driver
         triggers:
      	'acpi_processor_cst_has_changed'
      		'cpuidle_pause_and_lock'
      			'cpuidle_uninstall_idle_handler'
      				'kick_all_cpus_sync'.
      
      All cpus will exit their idle state and the pointed object will be set to
      NULL.
      
      2. The cpuidle driver is unloaded. Logically that could happen but not
      in practice because the drivers are always compiled in and 95% of them are
      not coded to unregister themselves.  In any case, the unloading code must
      call 'cpuidle_unregister_device', that calls 'cpuidle_pause_and_lock'
      leading to 'kick_all_cpus_sync' as mentioned above.
      
      A race can happen if we use the pointer and then one of these two scenarios
      occurs at the same moment.
      
      In order to be safe, the idle state pointer stored in the rq must be
      used inside a rcu_read_lock section where we are protected with the
      'rcu_barrier' in the 'cpuidle_uninstall_idle_handler' function. The
      idle_get_state() and idle_put_state() accessors should be used to that
      effect.
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: linux-pm@vger.kernel.org
      Cc: linaro-kernel@lists.linaro.org
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Link: http://lkml.kernel.org/n/tip-@git.kernel.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      442bf3aa
  6. 19 9月, 2014 1 次提交
  7. 16 9月, 2014 1 次提交
  8. 09 9月, 2014 1 次提交
  9. 27 8月, 2014 2 次提交
  10. 09 8月, 2014 1 次提交
    • T
      ARM: EXYNOS: Fix suspend/resume sequences · 01601b34
      Tomasz Figa 提交于
      Due to recent consolidation of Exynos suspend and cpuidle code, some
      parts of suspend and resume sequences are executed two times, once from
      exynos_pm_syscore_ops and then from exynos_cpu_pm_notifier() and thus it
      breaks suspend, at least on Exynos4-based boards. In addition, simple
      core power down from a cpuidle driver could, in case of CPU 0 could
      result in calling functions that are specific to suspend and deeper idle
      states.
      
      This patch fixes the issue by moving those operations outside the CPU PM
      notifier into suspend and AFTR code paths. This leads to a bit of code
      duplication, but allows additional code simplification, so in the end
      more code is removed than added.
      
      Fixes: 85f9f908 ("ARM: EXYNOS: Use the cpu_pm notifier for pm")
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: arm@kernel.org
      Signed-off-by: NTomasz Figa <t.figa@samsung.com>
      [b.zolnierkie: ported patch over current changes]
      [b.zolnierkie: fixed exynos_aftr_finisher() return value]
      Signed-off-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      01601b34
  11. 07 8月, 2014 4 次提交
  12. 05 8月, 2014 1 次提交
  13. 29 7月, 2014 4 次提交
  14. 28 7月, 2014 1 次提交
  15. 24 7月, 2014 3 次提交
  16. 20 7月, 2014 1 次提交
  17. 19 7月, 2014 3 次提交
  18. 09 7月, 2014 1 次提交
  19. 19 6月, 2014 2 次提交
  20. 11 6月, 2014 1 次提交
  21. 05 6月, 2014 1 次提交
  22. 28 5月, 2014 1 次提交
    • P
      cpuidle: cpuidle-cps: add MIPS CPS cpuidle driver · d0508944
      Paul Burton 提交于
      This patch adds a cpuidle driver for systems based around the MIPS
      Coherent Processing System (CPS) architecture. It supports four idle
      states:
      
        - The standard MIPS wait instruction.
      
        - The non-coherent wait, clock gated & power gated states exposed by
          the recently added pm-cps layer.
      
      The pm-cps layer is used to enter all the deep idle states. Since cores
      in the clock or power gated states cannot service interrupts, the
      gic_send_ipi_single function is modified to send a power up command for
      the appropriate core to the CPC in cases where the target CPU has marked
      itself potentially incoherent.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      d0508944
  23. 26 5月, 2014 1 次提交
  24. 09 5月, 2014 1 次提交