Thread (37 messages) flat view 37 messages, 11 authors, 2012-02-11
STALE5294d

[PATCH v6 13/15] ARM: hotplug: Introduce dummy_cpu_kill

From: Russell King - ARM Linux <hidden>
Date: 2012-02-09 08:46:42

On Wed, Feb 08, 2012 at 04:16:24PM -0800, Nicolas Pitre wrote:
What avout this instead:

int __weak __cpuinit platform_cpu_kill(unsigned int cpu)
{
	if (!soc_smp_ops)
		return 0;
	if (!soc_smp_ops->cpu_kill)
		return 1;
	return soc_smp_ops->cpu_kill(cpu);
}

and get rid of the dummy handler entirely?
No.  This is silly.  Think about it - if you don't provide a cpu_kill
then you can't support the unplug operation.  So you shouldn't even
allow the system to get anywhere near this.

So get rid of the tests for soc_smp_ops and soc_smp_ops->cpu_kill, and
just make this a simple:

	return soc_smp_ops->cpu_kill(cpu);

I'm not sure that the call to platform_cpu_kill() in ipi_cpu_stop() is
correct - platform_cpu_kill() is supposed to run on a CPU which is not
the one going down, whereas platform_cpu_die() runs on the CPU which
is going down.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help