linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] MCPM/TC2 support for CPU powerdown synchronisation
@ 2013-10-01 17:15 Dave Martin
  2013-10-01 17:15 ` [PATCH v3 1/3] ARM: mcpm: Factor out logical-to-physical CPU translation Dave Martin
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Dave Martin @ 2013-10-01 17:15 UTC (permalink / raw)
  To: linux-arm-kernel

This series adds MCPM support for detecting when a CPU is safely powered
down, and provides an implementation for TC2.

It should be possible to implement the same thing for PSCI using the
AFFINITY_INFO call (I need to check the semantics with Charles)

This is sufficient to for working kexec with real power management on
TC2.  To test it, you'll also need:

  * CONFIG_KEXEC=y
  * CONFIG_PROC_DEVICE_TREE=y
  * CONFIG_MCPM=y
  * CONFIG_ARCH_VEXPRESS_TC2_PM=y
  * sufficiently new kexec-tools
    (git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git
    v2.0.4 worked for me)

This build on Nico's patch
http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7842/1
(MCPM: don't explode if invoked without being initialized first)

To prevent CPUs from running off into the weeds across kexec, this
series requires Lorenzo's patch
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-September/200917.html
(arm: vexpress: tc2: fix hotplug/idle/kexec race on cluster power down).

Changes since v2:

 * Return a proper failure code if mcpm_cpu_power_down_finish() is
   called with no mcpm platforms_ops registered, or a NULL
   power_down_finish() method.  (Thanks again Nico)

 * Minor refactoring of the loop in tc2_pm_power_down_finish() to
   avoid the goto.

Changes between v1 and v2:

 * "Fix" erroneous documentation comment by switching to -errno return
   value convention for power_down_finish(), which is more informative.
   tc2_pm now returns -ETIMEDOUT on timeout.  The return is adapted to
   bool convention on return from smp_ops.cpu_kill() instead.  (Thanks,
   Nico).

 * For consistency, BUG_ON out of range cpu or cluster values
   tc2_pm_power_down_finish(), as for tc2_pm_power_down().

Changes between RFC and v1:

 * Print a big fat warning instead of branching to null if the
   power_down_finish() method is not supplied by the backend, or not
   registered.

 * Add a generous timeout of 1 second for the TC2 implementation.

 * Relax the polling interval to 10ms for TC2, since the need to poll
   more than once is rare and this is not a performance-critical path.

 * Fix some silly typos.


Dave Martin (3):
  ARM: mcpm: Factor out logical-to-physical CPU translation
  ARM: mcpm: Implement cpu_kill() to synchronise on powerdown
  ARM: vexpress/TC2: Implement MCPM power_down_finish()

 arch/arm/common/mcpm_entry.c    |   15 +++++++++
 arch/arm/common/mcpm_platsmp.c  |   27 +++++++++++++---
 arch/arm/include/asm/mcpm.h     |   31 ++++++++++++++++++
 arch/arm/mach-vexpress/spc.c    |   39 +++++++++++++++++++++++
 arch/arm/mach-vexpress/spc.h    |    1 +
 arch/arm/mach-vexpress/tc2_pm.c |   66 ++++++++++++++++++++++++++++++++++++---
 6 files changed, 170 insertions(+), 9 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 13+ messages in thread
[parent not found: <CALicx6v86NMp53+zbE=A3ang-ftGE3KiUojkRZO4ss6Pmks1ow@mail.gmail.com>]

end of thread, other threads:[~2013-11-05  5:27 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-01 17:15 [PATCH v3 0/3] MCPM/TC2 support for CPU powerdown synchronisation Dave Martin
2013-10-01 17:15 ` [PATCH v3 1/3] ARM: mcpm: Factor out logical-to-physical CPU translation Dave Martin
2013-10-01 17:15 ` [PATCH v3 2/3] ARM: mcpm: Implement cpu_kill() to synchronise on powerdown Dave Martin
2013-10-01 17:35   ` Nicolas Pitre
2013-10-01 18:12     ` Dave Martin
2013-10-01 18:34       ` Nicolas Pitre
2013-10-01 17:15 ` [PATCH v3 3/3] ARM: vexpress/TC2: Implement MCPM power_down_finish() Dave Martin
     [not found] <CALicx6v86NMp53+zbE=A3ang-ftGE3KiUojkRZO4ss6Pmks1ow@mail.gmail.com>
2013-10-24 12:48 ` [PATCH v3 0/3] MCPM/TC2 support for CPU powerdown synchronisation Vijay Kilari
2013-10-24 12:49   ` Vijay Kilari
2013-10-24 16:45     ` Sudeep KarkadaNagesha
2013-10-25 15:46     ` Dave Martin
2013-10-27  2:52       ` Nicolas Pitre
2013-11-05  5:27       ` Vijay Kilari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).