[PATCH v6 13/15] ARM: hotplug: Introduce dummy_cpu_kill
Russell King - ARM Linux
linux at arm.linux.org.uk
Thu Feb 9 03:46:42 EST 2012
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.
More information about the linux-arm-kernel
mailing list