ARM: npcm: Add CPU hotplug callbacks for kexec support
Subsystems (3)
PATCH 1/1 ARM: npcm: Add CPU hotplug callbacks for kexec support
From: Brian Ma <[email protected]>
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.
--- arch/arm/mach-npcm/platsmp.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm/mach-npcm/platsmp.c +17 -0
@@ -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);
Signature · 1 line
2.42.0.820.g83a721a137-goog
PATCH RESEND 1/1 ARM: npcm: Add CPU hotplug callbacks for kexec support
From: Brian Ma <[email protected]>
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.
--- arch/arm/mach-npcm/platsmp.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm/mach-npcm/platsmp.c +17 -0
@@ -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);
Signature · 1 line
2.42.0.820.g83a721a137-goog
PATCH RESEND 1/1 ARM: npcm: Add CPU hotplug callbacks for kexec support
In reply to [email protected]From: Brian Ma <[email protected]>
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.
--- arch/arm/mach-npcm/platsmp.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm/mach-npcm/platsmp.c +17 -0
@@ -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);
Signature · 1 line
2.42.0.820.g83a721a137-goog
Tomer Maimon
maintainerHi William,
Quoted 6 lines · On Thu, 2 Nov 2023 at 02:53, <[email protected]> wrote:
From: Brian Ma <[email protected]>
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.
Quoted 40 lines
Signed-off-by Brian Ma <[email protected]>Signed-off-by William A. Kennington III <[email protected]>--- arch/arm/mach-npcm/platsmp.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)arch/arm/mach-npcm/platsmp.c +17
-1@@ -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); --
Quoted 2 lines
2.42.0.820.g83a721a137-goog
Best regards,
Tomer
Quoted 4 lines · Tomer Maimon
Hi William,
Quoted 8 lines
Quoted 6 lines · On Thu, 2 Nov 2023 at 02:53, <[email protected]> wrote:
From: Brian Ma <[email protected]>
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.
Quoted 46 lines
Quoted 40 lines
Signed-off-by Brian Ma <[email protected]>Signed-off-by William A. Kennington III <[email protected]>--- arch/arm/mach-npcm/platsmp.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)arch/arm/mach-npcm/platsmp.c +17
-1@@ -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); --Quoted 2 lines
2.42.0.820.g83a721a137-goog
Best regards,
Tomer
PATCH v2 1/1 ARM: npcm: Add CPU hotplug callbacks for kexec support
In reply to [email protected]From: Brian Ma <[email protected]>
Add callbacks required for kexec to function. The NPCM7xx does not expose controls for powering down CPU cores, so just wait in idle loop.
--- arch/arm/mach-npcm/platsmp.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
arch/arm/mach-npcm/platsmp.c +17 -0
@@ -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);
Signature · 1 line
2.42.0.820.g83a721a137-goog
Quoted 46 lines · William A. Kennington III
From: Brian Ma <[email protected]>
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 <[email protected]>Signed-off-by William A. Kennington III <[email protected]>--- arch/arm/mach-npcm/platsmp.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)arch/arm/mach-npcm/platsmp.c +17
-1@@ -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); --
Quoted 2 lines
2.42.0.820.g83a721a137-goog
'
Mind taking another look? This should be updated accordingly.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi William,
Quoted 47 lines · William Kennington
Quoted 44 lines · William A. Kennington III
From: Brian Ma <[email protected]>
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 <[email protected]>Signed-off-by William A. Kennington III <[email protected]>--- arch/arm/mach-npcm/platsmp.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)arch/arm/mach-npcm/platsmp.c +17
-0@@ -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 };
Quoted 6 lines
Quoted 4 lines
arch/arm/mach-npcm/platsmp.c +0
-1CPU_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.
Best regards,
Tomer