From: Ian Campbell Date: Tue, 3 Aug 2010 21:55:14 +0000 (-0700) Subject: xen/panic: use xen_reboot and fix smp_send_stop X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=086748e52fb072ff0935ba4512e29c421bd5b716;p=linux-beck.git xen/panic: use xen_reboot and fix smp_send_stop Offline vcpu when using stop_self. Signed-off-by: Ian Campbell Signed-off-by: Jeremy Fitzhardinge --- diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index d99522e8f033..3c4da8bee06f 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -1043,10 +1043,7 @@ static void xen_crash_shutdown(struct pt_regs *regs) static int xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr) { - struct sched_shutdown r = { .reason = SHUTDOWN_crash}; - - if (HYPERVISOR_sched_op(SCHEDOP_shutdown, &r)) - BUG(); + xen_reboot(SHUTDOWN_crash); return NOTIFY_DONE; } diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index a29693fd3138..25f232b18a82 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c @@ -394,6 +394,8 @@ static void stop_self(void *v) load_cr3(swapper_pg_dir); /* should set up a minimal gdt */ + set_cpu_online(cpu, false); + HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL); BUG(); }