* [PATCH] ARM: npcm: Add CPU hotplug callbacks for kexec support
@ 2023-11-02 0:24 william
2023-11-02 0:52 ` [PATCH RESEND] " william
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: william @ 2023-11-02 0:24 UTC (permalink / raw)
To: tmaimon77, tali.perry1, avifishman70
Cc: linux-arm-kernel, linux-kernel, openbmc, Brian Ma,
William A . Kennington III
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
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH RESEND] ARM: npcm: Add CPU hotplug callbacks for kexec support
2023-11-02 0:24 [PATCH] ARM: npcm: Add CPU hotplug callbacks for kexec support william
@ 2023-11-02 0:52 ` william
2023-11-02 0:53 ` william
2023-11-02 10:10 ` [PATCH v2] " William A. Kennington III
2 siblings, 0 replies; 8+ messages in thread
From: william @ 2023-11-02 0:52 UTC (permalink / raw)
To: tmaimon77, tali.perry1, avifishman70
Cc: linux-arm-kernel, linux-kernel, openbmc, Brian Ma,
William A . Kennington III
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
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH RESEND] ARM: npcm: Add CPU hotplug callbacks for kexec support
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:53 ` william
2023-11-02 8:38 ` Tomer Maimon
2023-11-02 10:10 ` [PATCH v2] " William A. Kennington III
2 siblings, 1 reply; 8+ messages in thread
From: william @ 2023-11-02 0:53 UTC (permalink / raw)
To: tmaimon77, tali.perry1, avifishman70
Cc: linux-arm-kernel, linux-kernel, openbmc, Brian Ma,
William A . Kennington III
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
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH RESEND] ARM: npcm: Add CPU hotplug callbacks for kexec support
2023-11-02 0:53 ` william
@ 2023-11-02 8:38 ` Tomer Maimon
2023-11-02 10:12 ` William Kennington
0 siblings, 1 reply; 8+ messages in thread
From: Tomer Maimon @ 2023-11-02 8:38 UTC (permalink / raw)
To: william
Cc: tali.perry1, avifishman70, linux-arm-kernel, linux-kernel,
openbmc, Brian Ma
Hi William,
On Thu, 2 Nov 2023 at 02:53, <william@wkennington.com> wrote:
>
> 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.
This patch is related only to NPCM7xx please modify NPCM7xx/NPCN8xx to NPCM7xx.
>
> 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
>
Best regards,
Tomer
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH RESEND] ARM: npcm: Add CPU hotplug callbacks for kexec support
2023-11-02 8:38 ` Tomer Maimon
@ 2023-11-02 10:12 ` William Kennington
0 siblings, 0 replies; 8+ messages in thread
From: William Kennington @ 2023-11-02 10:12 UTC (permalink / raw)
To: Tomer Maimon
Cc: william, Brian Ma, avifishman70, openbmc, linux-kernel,
tali.perry1, linux-arm-kernel
On Thu, Nov 2, 2023 at 1:39 AM Tomer Maimon <tmaimon77@gmail.com> wrote:
>
> Hi William,
>
>
> On Thu, 2 Nov 2023 at 02:53, <william@wkennington.com> wrote:
> >
> > 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.
> This patch is related only to NPCM7xx please modify NPCM7xx/NPCN8xx to NPCM7xx.
Fixed in v2 message.
> >
> > 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
> >
>
> Best regards,
>
> Tomer
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] ARM: npcm: Add CPU hotplug callbacks for kexec support
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:53 ` william
@ 2023-11-02 10:10 ` William A. Kennington III
2023-12-01 23:51 ` William Kennington
2 siblings, 1 reply; 8+ messages in thread
From: William A. Kennington III @ 2023-11-02 10:10 UTC (permalink / raw)
To: tmaimon77, tali.perry1, avifishman70
Cc: linux-arm-kernel, linux-kernel, openbmc, Brian Ma,
William A . Kennington III
From: Brian Ma <chma0@nuvoton.com>
Add callbacks required for kexec to function. The NPCM7xx 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
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v2] ARM: npcm: Add CPU hotplug callbacks for kexec support
2023-11-02 10:10 ` [PATCH v2] " William A. Kennington III
@ 2023-12-01 23:51 ` William Kennington
2023-12-03 8:03 ` Tomer Maimon
0 siblings, 1 reply; 8+ messages in thread
From: William Kennington @ 2023-12-01 23:51 UTC (permalink / raw)
To: tmaimon77, tali.perry1, avifishman70
Cc: linux-arm-kernel, linux-kernel, openbmc, Brian Ma
On Thu, Nov 2, 2023 at 3:10 AM William A. Kennington III
<william@wkennington.com> wrote:
>
> From: Brian Ma <chma0@nuvoton.com>
>
> Add callbacks required for kexec to function. The NPCM7xx 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
>'
Mind taking another look? This should be updated accordingly.
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v2] ARM: npcm: Add CPU hotplug callbacks for kexec support
2023-12-01 23:51 ` William Kennington
@ 2023-12-03 8:03 ` Tomer Maimon
0 siblings, 0 replies; 8+ messages in thread
From: Tomer Maimon @ 2023-12-03 8:03 UTC (permalink / raw)
To: William Kennington
Cc: tali.perry1, avifishman70, linux-arm-kernel, linux-kernel,
openbmc, Brian Ma
Hi William,
On Sat, 2 Dec 2023 at 01:51, William Kennington <william@wkennington.com> wrote:
>
> On Thu, Nov 2, 2023 at 3:10 AM William A. Kennington III
> <william@wkennington.com> wrote:
> >
> > From: Brian Ma <chma0@nuvoton.com>
> >
> > Add callbacks required for kexec to function. The NPCM7xx 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
> >'
>
> Mind taking another look? This should be updated accordingly.
Reviewed-by: Tomer Maimon <tmaimon77@gmail.com>
Best regards,
Tomer
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-12-03 8:03 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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:53 ` william
2023-11-02 8:38 ` Tomer Maimon
2023-11-02 10:12 ` William Kennington
2023-11-02 10:10 ` [PATCH v2] " William A. Kennington III
2023-12-01 23:51 ` William Kennington
2023-12-03 8:03 ` Tomer Maimon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox