From: william@wkennington.com
To: tmaimon77@gmail.com, tali.perry1@gmail.com, avifishman70@gmail.com
Cc: "William A . Kennington III" <william@wkennington.com>,
openbmc@lists.ozlabs.org, Brian Ma <chma0@nuvoton.com>,
linux-kernel@vger.kernel.org, linux-arm-kernel@vger.kernel.org
Subject: [PATCH] ARM: npcm: Add CPU hotplug callbacks for kexec support
Date: Wed, 1 Nov 2023 17:24:53 -0700 [thread overview]
Message-ID: <20231102002453.1299195-1-william@wkennington.com> (raw)
From: Brian Ma <chma0@nuvoton.com>
Add callbacks required for kexec to function. The NPCM7xx/NPCN8xx does
not expose controls for powering down CPU cores, so just wait in idle
loop.
Signed-off-by: Brian Ma <chma0@nuvoton.com>
Signed-off-by: William A. Kennington III <william@wkennington.com>
---
arch/arm/mach-npcm/platsmp.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/arm/mach-npcm/platsmp.c b/arch/arm/mach-npcm/platsmp.c
index 41891d3aa124..6cc7b5894f08 100644
--- a/arch/arm/mach-npcm/platsmp.c
+++ b/arch/arm/mach-npcm/platsmp.c
@@ -69,10 +69,27 @@ static void __init npcm7xx_smp_prepare_cpus(unsigned int max_cpus)
iounmap(scu_base);
}
+#ifdef CONFIG_HOTPLUG_CPU
+static void npcm7xx_cpu_die(unsigned int cpu)
+{
+ while (1)
+ cpu_do_idle();
+}
+
+static int npcm7xx_cpu_kill(unsigned int l_cpu)
+{
+ return 1;
+}
+#endif
+
static struct smp_operations npcm7xx_smp_ops __initdata = {
.smp_prepare_cpus = npcm7xx_smp_prepare_cpus,
.smp_boot_secondary = npcm7xx_smp_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+ .cpu_die = npcm7xx_cpu_die,
+ .cpu_kill = npcm7xx_cpu_kill,
+#endif
};
CPU_METHOD_OF_DECLARE(npcm7xx_smp, "nuvoton,npcm750-smp", &npcm7xx_smp_ops);
--
2.42.0.820.g83a721a137-goog
WARNING: multiple messages have this Message-ID (diff)
From: william@wkennington.com
To: tmaimon77@gmail.com, tali.perry1@gmail.com, avifishman70@gmail.com
Cc: linux-arm-kernel@vger.kernel.org, linux-kernel@vger.kernel.org,
openbmc@lists.ozlabs.org, Brian Ma <chma0@nuvoton.com>,
"William A . Kennington III" <william@wkennington.com>
Subject: [PATCH] ARM: npcm: Add CPU hotplug callbacks for kexec support
Date: Wed, 1 Nov 2023 17:24:53 -0700 [thread overview]
Message-ID: <20231102002453.1299195-1-william@wkennington.com> (raw)
From: Brian Ma <chma0@nuvoton.com>
Add callbacks required for kexec to function. The NPCM7xx/NPCN8xx does
not expose controls for powering down CPU cores, so just wait in idle
loop.
Signed-off-by: Brian Ma <chma0@nuvoton.com>
Signed-off-by: William A. Kennington III <william@wkennington.com>
---
arch/arm/mach-npcm/platsmp.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/arm/mach-npcm/platsmp.c b/arch/arm/mach-npcm/platsmp.c
index 41891d3aa124..6cc7b5894f08 100644
--- a/arch/arm/mach-npcm/platsmp.c
+++ b/arch/arm/mach-npcm/platsmp.c
@@ -69,10 +69,27 @@ static void __init npcm7xx_smp_prepare_cpus(unsigned int max_cpus)
iounmap(scu_base);
}
+#ifdef CONFIG_HOTPLUG_CPU
+static void npcm7xx_cpu_die(unsigned int cpu)
+{
+ while (1)
+ cpu_do_idle();
+}
+
+static int npcm7xx_cpu_kill(unsigned int l_cpu)
+{
+ return 1;
+}
+#endif
+
static struct smp_operations npcm7xx_smp_ops __initdata = {
.smp_prepare_cpus = npcm7xx_smp_prepare_cpus,
.smp_boot_secondary = npcm7xx_smp_boot_secondary,
+#ifdef CONFIG_HOTPLUG_CPU
+ .cpu_die = npcm7xx_cpu_die,
+ .cpu_kill = npcm7xx_cpu_kill,
+#endif
};
CPU_METHOD_OF_DECLARE(npcm7xx_smp, "nuvoton,npcm750-smp", &npcm7xx_smp_ops);
--
2.42.0.820.g83a721a137-goog
next reply other threads:[~2023-11-02 0:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 0:24 william [this message]
2023-11-02 0:24 ` [PATCH] ARM: npcm: Add CPU hotplug callbacks for kexec support william
2023-11-02 0:52 ` [PATCH RESEND] " william
2023-11-02 0:52 ` william
2023-11-02 0:53 ` william
2023-11-02 0:53 ` william
2023-11-02 0:53 ` william
2023-11-02 8:38 ` Tomer Maimon
2023-11-02 8:38 ` Tomer Maimon
2023-11-02 8:38 ` Tomer Maimon
2023-11-02 10:12 ` William Kennington
2023-11-02 10:12 ` William Kennington
2023-11-02 10:12 ` William Kennington
2023-11-02 10:10 ` [PATCH v2] " William A. Kennington III
2023-11-02 10:10 ` William A. Kennington III
2023-11-02 10:10 ` William A. Kennington III
2023-12-01 23:51 ` William Kennington
2023-12-01 23:51 ` William Kennington
2023-12-01 23:51 ` William Kennington
2023-12-03 8:03 ` Tomer Maimon
2023-12-03 8:03 ` Tomer Maimon
2023-12-03 8:03 ` Tomer Maimon
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=20231102002453.1299195-1-william@wkennington.com \
--to=william@wkennington.com \
--cc=avifishman70@gmail.com \
--cc=chma0@nuvoton.com \
--cc=linux-arm-kernel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=tali.perry1@gmail.com \
--cc=tmaimon77@gmail.com \
/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 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.