On 12/23/13 at 07:36am, Matt Fleming wrote: > On Sun, 22 Dec, at 02:27:01PM, Toshi Kani wrote: > > > > The kexec branch is missing the following change, which is required for > > fast reboot with multi-cpus. > > > > commit 279f1df915c3a6ed3075d98a849705bf53851f99 > > Author: Vivek Goyal <vgoyal at redhat.com> > > Date: Tue Nov 26 10:25:28 2013 +0800 > > > > kexec: migrate to reboot cpu > > > > With this change added, I confirmed that the branch kernel works fine. > > I can't find that commit in Linus' tree. Where is it from? Previously it was in Andrew's mm tree, currently it's below commit in linus tree: commit c97102ba96324da330078ad8619ba4dfe840dbe3 Author: Vivek Goyal <vgoyal at redhat.com> Date: Wed Dec 18 17:08:31 2013 -0800 kexec: migrate to reboot cpu Commit 1b3a5d02ee07 ("reboot: move arch/x86 reboot= handling to generic kernel") moved reboot= handling to generic code. In the process it also removed the code in native_machine_shutdown() which are moving reboot process to reboot_cpu/cpu0. I guess that thought must have been that all reboot paths are calling migrate_to_reboot_cpu(), so we don't need this special handling. But kexec reboot path (kernel_kexec()) is not calling migrate_to_reboot_cpu() so above change broke kexec. Now reboot can happen on non-boot cpu and when INIT is sent in second kerneo to bring up BP, it brings down the machine. So start calling migrate_to_reboot_cpu() in kexec reboot path to avoid this problem. Bisected by WANG Chao. Reported-by: Matthew Whitehead <mwhitehe at redhat.com> Reported-by: Dave Young <dyoung at redhat.com> Signed-off-by: Vivek Goyal <vgoyal at redhat.com> Tested-by: Baoquan He <bhe at redhat.com> Tested-by: WANG Chao <chaowang at redhat.com> Acked-by: H. Peter Anvin <hpa at linux.intel.com> Cc: <stable at vger.kernel.org> Signed-off-by: Andrew Morton <akpm at linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>