[PATCH] kexec: return error of machine_kexec() fails
Russell King - ARM Linux
linux at arm.linux.org.uk
Wed Jul 10 19:51:47 EDT 2013
On Wed, Jul 10, 2013 at 01:42:17PM -0700, Eric W. Biederman wrote:
> I meant code not hardware architecture. We keep having code thrown in
> the the shutdown paths because ARM only supports cpu shutdown via cpu
> hotunplug and cpu hotunplug is not universally available.
> That is a software architecture BUG with the ARM kernels.
There are many problems here:
1) if you can't place a CPU individually into reset, what do you do with
it over a kexec?
Once woken it executes code. It will never stop executing code. If you
place it inside an infinite loop in the existing kernel, and then
overwrite it, it will then start executing the instructions there when
the new kernel broadcasts the cache flushes, and it will start executing
whatever code is there.
2) if the CPU itself needs to execute code to shut itself down, how do
you get it to do that on a crash-based kexec when IPI broadcasts may not
3) what about situations where you need the requestor to also do something
to shut down the secondary CPU?
Taking CPUs offline is not an easy thing to do when every platform plays
their own games with doing that, and then you have security crap that
gets in the way too, with the security crap having platform specific
CPU hotplug is by far the best solution we have to this mess.
More information about the kexec