* [PATCH v2] ARM: socfpga: add smp_ops.cpu_kill to make kexec/kdump available
@ 2015-06-10 7:47 ` Hiraku Toyooka
0 siblings, 0 replies; 4+ messages in thread
From: Hiraku Toyooka @ 2015-06-10 7:47 UTC (permalink / raw)
To: dinguyen, linux; +Cc: linux-kernel, linux-arm-kernel
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
---
arch/arm/mach-socfpga/platsmp.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/mach-socfpga/platsmp.c b/arch/arm/mach-socfpga/platsmp.c
index c64d89b..3caf7c3 100644
--- a/arch/arm/mach-socfpga/platsmp.c
+++ b/arch/arm/mach-socfpga/platsmp.c
@@ -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
};
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2] ARM: socfpga: add smp_ops.cpu_kill to make kexec/kdump available
@ 2015-06-10 7:47 ` Hiraku Toyooka
0 siblings, 0 replies; 4+ messages in thread
From: Hiraku Toyooka @ 2015-06-10 7:47 UTC (permalink / raw)
To: linux-arm-kernel
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 at lists.infradead.org
Cc: linux-kernel at vger.kernel.org
---
arch/arm/mach-socfpga/platsmp.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/mach-socfpga/platsmp.c b/arch/arm/mach-socfpga/platsmp.c
index c64d89b..3caf7c3 100644
--- a/arch/arm/mach-socfpga/platsmp.c
+++ b/arch/arm/mach-socfpga/platsmp.c
@@ -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
};
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ARM: socfpga: add smp_ops.cpu_kill to make kexec/kdump available
2015-06-10 7:47 ` Hiraku Toyooka
@ 2015-06-10 22:46 ` Dinh Nguyen
-1 siblings, 0 replies; 4+ messages in thread
From: Dinh Nguyen @ 2015-06-10 22:46 UTC (permalink / raw)
To: Hiraku Toyooka, linux; +Cc: linux-kernel, linux-arm-kernel
On 06/10/2015 02:47 AM, Hiraku Toyooka wrote:
> 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
> ---
> arch/arm/mach-socfpga/platsmp.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
Applied!
Thanks,
Dinh
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] ARM: socfpga: add smp_ops.cpu_kill to make kexec/kdump available
@ 2015-06-10 22:46 ` Dinh Nguyen
0 siblings, 0 replies; 4+ messages in thread
From: Dinh Nguyen @ 2015-06-10 22:46 UTC (permalink / raw)
To: linux-arm-kernel
On 06/10/2015 02:47 AM, Hiraku Toyooka wrote:
> 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 at lists.infradead.org
> Cc: linux-kernel at vger.kernel.org
> ---
> arch/arm/mach-socfpga/platsmp.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
Applied!
Thanks,
Dinh
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-10 22:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-10 7:47 [PATCH v2] ARM: socfpga: add smp_ops.cpu_kill to make kexec/kdump available Hiraku Toyooka
2015-06-10 7:47 ` Hiraku Toyooka
2015-06-10 22:46 ` Dinh Nguyen
2015-06-10 22:46 ` Dinh Nguyen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.