ARM: mvebu: implement CPU hotplug support for Armada XP
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 30 May 2014 20:18:17 +0000 (22:18 +0200)
committerJason Cooper <jason@lakedaemon.net>
Sat, 21 Jun 2014 00:31:47 +0000 (00:31 +0000)
commit26337779465637b761624d9752f52d1ec88f71d9
tree9388a904c742cea91f5552b980b236034c6dc71d
parent8ea875e72d2dd66eea393f22c6bf4707f92f4a50
ARM: mvebu: implement CPU hotplug support for Armada XP

This commit implements CPU hotplug support for the Marvell Armada XP
platform. The CPU hotplug stub functions from hotplug.c are moved into
platsmp.c, as it doesn't make much sense to have a separate file just
for these two functions.

In addition, this commit:

 * Implements the ->cpu_die() function of SMP operations by calling
   armada_370_xp_pmsu_idle_enter() to enter the deep idle state for
   CPUs going offline.

 * Implements a dummy ->cpu_kill() function, simply needed for the
   kernel to know we have CPU hotplug support.

 * The armada_xp_boot_secondary() function makes sure to wake up the
   CPU if waiting in deep idle state by sending an IPI. This is
   because armada_xp_boot_secondary() is now used in two different
   situations: for the initial boot of secondary CPUs (where CPU reset
   deassert is used to wake up CPUs) and for CPU hotplug (where an IPI
   is used to take CPU out of deep idle).

 * At boot time, we exit from the idle state in the
   ->smp_secondary_init() hook.

This commit has been tested using CPU hotplug through sysfs
(/sys/devices/system/cpu/cpuX/online) and using kexec.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1401481098-23326-5-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
arch/arm/mach-mvebu/Makefile
arch/arm/mach-mvebu/common.h
arch/arm/mach-mvebu/hotplug.c [deleted file]
arch/arm/mach-mvebu/platsmp.c