Thread (7 messages) 7 messages, 2 authors, 2012-12-23
STALE4913d

[PATCH] kexec: disable non-boot CPUs

From: Will Deacon <hidden>
Date: 2012-12-20 17:36:11
Also in: kexec, linux-tegra

On Thu, Dec 20, 2012 at 05:21:56PM +0000, Stephen Warren wrote:
On 12/20/2012 03:49 AM, Will Deacon wrote:
quoted
If you do manage to get this merged, please can you follow up with a patch
to remove the smp_kill_cpus bits from arch/arm/kernel/smp.c please? It only
exists as a hook to do exactly this and currently nobody is using it afaict.
I originally implemented this in
arch/arm/kernel/process.c:machine_shutdown(), which currently is:

void machine_shutdown(void)
{
#ifdef CONFIG_SMP
	smp_send_stop();
#endif
}

and I changed it to something like:

void machine_shutdown(void)
{
#ifdef CONFIG_HOTPLUG_CPU
 	disable_nonboot_cpus();
#elifdef CONFIG_SMP
	smp_send_stop();
#endif
}

... but then figured that moving it up into the core kexec code would be
better, so that everything always worked the same way.
Hmmm, isn't this racy: requiring the secondaries to hit idle and notice
they're offline and call cpu_die before the primary has replace the kernel
image?
Anyway, the change above addresses Eric's concern about isolating the
change to ARM. Does that seem like a reasonable thing for the ARM code
to do?
I think you're better off using what we currently have and hanging your code
off platform_cpu_kill.

Will
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help