linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] ARM: OMAP4+: Allow kexec on SMP variants
Date: Tue, 21 Jun 2016 00:52:45 -0700	[thread overview]
Message-ID: <1466495565-17480-5-git-send-email-tony@atomide.com> (raw)
In-Reply-To: <1466495565-17480-1-git-send-email-tony@atomide.com>

Kexec needs omap4_cpu_kill, otherwise kexec will produce on SMP:

kexec_load failed: Invalid argument

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/common.h       | 1 +
 arch/arm/mach-omap2/omap-hotplug.c | 6 ++++++
 arch/arm/mach-omap2/omap-smp.c     | 1 +
 3 files changed, 8 insertions(+)

diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 0136405..deed42e 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -272,6 +272,7 @@ extern void omap_auxcoreboot_addr(u32 cpu_addr);
 extern u32 omap_read_auxcoreboot0(void);
 
 extern void omap4_cpu_die(unsigned int cpu);
+extern int omap4_cpu_kill(unsigned int cpu);
 
 extern const struct smp_operations omap4_smp_ops;
 
diff --git a/arch/arm/mach-omap2/omap-hotplug.c b/arch/arm/mach-omap2/omap-hotplug.c
index 593fec7..d3fb566 100644
--- a/arch/arm/mach-omap2/omap-hotplug.c
+++ b/arch/arm/mach-omap2/omap-hotplug.c
@@ -64,3 +64,9 @@ void omap4_cpu_die(unsigned int cpu)
 		pr_debug("CPU%u: spurious wakeup call\n", cpu);
 	}
 }
+
+/* Needed by kexec and platform_can_cpu_hotplug() */
+int omap4_cpu_kill(unsigned int cpu)
+{
+	return 1;
+}
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 81bb053..d53a0de 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -329,5 +329,6 @@ const struct smp_operations omap4_smp_ops __initconst = {
 	.smp_boot_secondary	= omap4_boot_secondary,
 #ifdef CONFIG_HOTPLUG_CPU
 	.cpu_die		= omap4_cpu_die,
+	.cpu_kill		= omap4_cpu_kill,
 #endif
 };
-- 
2.8.1

  parent reply	other threads:[~2016-06-21  7:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21  7:52 [PATCH 0/4] Get kexec working on SMP omap variants Tony Lindgren
2016-06-21  7:52 ` [PATCH 1/4] ARM: OMAP4+: Initialize SAR RAM base early for proper CPU1 reset for kexec Tony Lindgren
2016-06-21  7:52 ` [PATCH 2/4] ARM: OMAP4+: Prevent CPU1 related hang with kexec Tony Lindgren
2016-06-24  7:40   ` Arnd Bergmann
2016-06-27 13:26     ` Tony Lindgren
2016-06-21  7:52 ` [PATCH 3/4] ARM: OMAP4+: Reset CPU1 properly for kexec Tony Lindgren
2016-06-21  7:52 ` Tony Lindgren [this message]
2016-06-21 16:07 ` [PATCH 0/4] Get kexec working on SMP omap variants Santosh Shilimkar
2016-06-22  9:53   ` Tony Lindgren
2016-06-22  8:35 ` Keerthy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1466495565-17480-5-git-send-email-tony@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).