]> rtime.felk.cvut.cz Git - linux-imx.git/commit
powerpc/kexec: Fix orphaned offline CPUs across kexec
authorMatt Evans <matt@ozlabs.org>
Mon, 7 Mar 2011 11:56:04 +0000 (17:26 +0530)
committerAK <andi@firstfloor.org>
Thu, 31 Mar 2011 18:58:20 +0000 (11:58 -0700)
commit125124738e4704bf30ac47a59c96f7e3cbfb8161
tree15ba4e76573662bfcd794c15b7ec4d58eff24457
parent551d7fec8a6edde9c3284e26f4566f1453490665
powerpc/kexec: Fix orphaned offline CPUs across kexec

Commit: e8e5c2155b0035b6e04f29be67f6444bc914005b upstream

When CPU hotplug is used, some CPUs may be offline at the time a kexec is
performed.  The subsequent kernel may expect these CPUs to be already running,
and will declare them stuck.  On pseries, there's also a soft-offline (cede)
state that CPUs may be in; this can also cause problems as the kexeced kernel
may ask RTAS if they're online -- and RTAS would say they are.  The CPU will
either appear stuck, or will cause a crash as we replace its cede loop beneath
it.

This patch kicks each present offline CPU awake before the kexec, so that
none are forever lost to these assumptions in the subsequent kernel.

Now, the behaviour is that all available CPUs that were offlined are now
online & usable after the kexec.  This mimics the behaviour of a full reboot
(on which all CPUs will be restarted).

Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Kamalesh babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
cc: Anton Blanchard <anton@samba.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/powerpc/kernel/machine_kexec_64.c