ARM: socfpga: add smp_ops.cpu_kill to make kexec/kdump available
Subsystems (3)
PATCH v2 1/1 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 <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Russell King <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org
--- arch/arm/mach-socfpga/platsmp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/mach-socfpga/platsmp.c +12 -0
@@ -95,11 +95,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 ; +} +struct smp_operations socfpga_smp_ops__initdata = { .smp_init_cpus = socfpga_smp_init_cpus, .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 };
Dinh Nguyen
AppliedQuoted 5 lines · Hiraku Toyooka
Kexec_loadsyscall in ARM requires that machine-specific code has thesmp_ops.cpu_kill()before loading kernel image. This patch adds thecpu_kill(), as a result, kexec reboot and kernel crash dump become available in mach-socfpga.
Quoted 9 lines
Signed-off-by Hiraku Toyooka <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Russell King <[email protected]>Cc linux-arm-kernel at lists.infradead.orgCc linux-kernel at vger.kernel.org--- arch/arm/mach-socfpga/platsmp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
Applied!
Thanks,
Dinh