aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2008-11-12 08:34:38 -0500
committerIngo Molnar <mingo@elte.hu>2008-11-12 12:55:44 -0500
commitb2bbe71b829564fb65a6bc7e1e25e02d70cffce8 (patch)
treefa8ac6bf84540f98b2c4e7aa20cbe6460143312d /arch/x86/kernel
parenta7d41820f683c35b53af719210a51f6aa0f86a6a (diff)
x86 kdump: move crashing_cpu assignment to nmi_shootdown_cpus()
Impact: cleanup This variable will be moved to non-kdump-specific code. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-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)