aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/crash.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
index 60475422a51a..ed2f0f9dc894 100644
--- a/arch/x86/kernel/crash.c
+++ b/arch/x86/kernel/crash.c
@@ -29,10 +29,11 @@
29 29
30#include <mach_ipi.h> 30#include <mach_ipi.h>
31 31
32#if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC)
33
32/* This keeps a track of which one is crashing cpu. */ 34/* This keeps a track of which one is crashing cpu. */
33static int crashing_cpu; 35static int crashing_cpu;
34 36
35#if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC)
36static atomic_t waiting_for_crash_ipi; 37static atomic_t waiting_for_crash_ipi;
37 38
38static void kdump_nmi_callback(int cpu, struct die_args *args) 39static void kdump_nmi_callback(int cpu, struct die_args *args)
@@ -100,6 +101,9 @@ static void nmi_shootdown_cpus(void)
100{ 101{
101 unsigned long msecs; 102 unsigned long msecs;
102 103
104 /* Make a note of crashing cpu. Will be used in NMI callback.*/
105 crashing_cpu = safe_smp_processor_id();
106
103 atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1); 107 atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);
104 /* Would it be better to replace the trap vector here? */ 108 /* Would it be better to replace the trap vector here? */
105 if (register_die_notifier(&crash_nmi_nb)) 109 if (register_die_notifier(&crash_nmi_nb))
@@ -140,8 +144,6 @@ void native_machine_crash_shutdown(struct pt_regs *regs)
140 /* The kernel is broken so disable interrupts */ 144 /* The kernel is broken so disable interrupts */
141 local_irq_disable(); 145 local_irq_disable();
142 146
143 /* Make a note of crashing cpu. Will be used in NMI callback.*/
144 crashing_cpu = safe_smp_processor_id();
145 nmi_shootdown_cpus(); 147 nmi_shootdown_cpus();
146 lapic_shutdown(); 148 lapic_shutdown();
147#if defined(CONFIG_X86_IO_APIC) 149#if defined(CONFIG_X86_IO_APIC)