[PATCH] ARM: smp: call platform's cpu_die in ipi_cpu_stop
Russell King - ARM Linux
linux at arm.linux.org.uk
Thu Apr 18 13:18:01 EDT 2013
On Sat, Apr 06, 2013 at 03:37:04PM +0300, Kevin Bracey wrote:
> When hotplugging out, both cpu_kill and cpu_die have always been called.
> But when smp_send_stop was used in machine_shutdown or panic, only
> cpu_kill was called.
>
> This causes problems for co-ordination between cpu_kill and cpu_die, as
> attempted by shmobile. So add cpu_die call to ipi_cpu_stop, to ensure
> that cpu_kill and cpu_die calls always occur together.
Actually, I'd prefer to pull more code out of the platforms. Now
that we have flush_cache_louis(), we can flush the L1 cache for the
CPU going down in cpu_die() itself. We just need to be careful
with that complete() call to ensure that becomes visible to other
cores before power is cut to the L1 cache.
That's fine though - because it must become visible for __cpu_die()
to continue (otherwise it will time out).
That should render shmobile's cpu_dead thing unnecessary, because the
platform independent code will do the required synchronisation.
More information about the linux-arm-kernel
mailing list