summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-socfpga
diff options
context:
space:
mode:
authorHiraku Toyooka <hiraku.toyooka.gu@hitachi.com>2015-06-10 07:47:19 +0000
committerDinh Nguyen <dinguyen@opensource.altera.com>2015-07-07 13:39:24 -0500
commitb33612e183dcbaa2cc2479cedff6984a6cccdf6a (patch)
tree0c57e1f0a6e79f7a1bba1e3252e004467835a872 /arch/arm/mach-socfpga
parentd770e558e21961ad6cfdf0ff7df0eb5d7d4f0754 (diff)
downloadop-kernel-dev-b33612e183dcbaa2cc2479cedff6984a6cccdf6a.zip
op-kernel-dev-b33612e183dcbaa2cc2479cedff6984a6cccdf6a.tar.gz
ARM: socfpga: add smp_ops.cpu_kill to make kexec/kdump available
Kexec_load syscall in ARM requires that machine-specific code has the smp_ops.cpu_kill() before loading kernel image. This patch adds the cpu_kill(), as a result, kexec reboot and kernel crash dump become available in mach-socfpga. Signed-off-by: Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com> Cc: Dinh Nguyen <dinguyen@opensource.altera.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-June/348004.html Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Diffstat (limited to 'arch/arm/mach-socfpga')
-rw-r--r--arch/arm/mach-socfpga/platsmp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-socfpga/platsmp.c b/arch/arm/mach-socfpga/platsmp.c
index c6f1df8..15c8ce8 100644
--- a/arch/arm/mach-socfpga/platsmp.c
+++ b/arch/arm/mach-socfpga/platsmp.c
@@ -106,11 +106,23 @@ static void socfpga_cpu_die(unsigned int cpu)
cpu_do_idle();
}
+/*
+ * We need a dummy function so that platform_can_cpu_hotplug() knows
+ * we support CPU hotplug. However, the function does not need to do
+ * anything, because CPUs going offline just do WFI. We could reset
+ * the CPUs but it would increase power consumption.
+ */
+static int socfpga_cpu_kill(unsigned int cpu)
+{
+ return 1;
+}
+
static struct smp_operations socfpga_smp_ops __initdata = {
.smp_prepare_cpus = socfpga_smp_prepare_cpus,
.smp_boot_secondary = socfpga_boot_secondary,
#ifdef CONFIG_HOTPLUG_CPU
.cpu_die = socfpga_cpu_die,
+ .cpu_kill = socfpga_cpu_kill,
#endif
};
@@ -119,6 +131,7 @@ static struct smp_operations socfpga_a10_smp_ops __initdata = {
.smp_boot_secondary = socfpga_a10_boot_secondary,
#ifdef CONFIG_HOTPLUG_CPU
.cpu_die = socfpga_cpu_die,
+ .cpu_kill = socfpga_cpu_kill,
#endif
};
OpenPOWER on IntegriCloud