x86: unify crash_32/64.c
[safe/jmp/linux-2.6] / arch / x86 / kernel / crash.c
similarity index 94%
rename from arch/x86/kernel/crash_32.c
rename to arch/x86/kernel/crash.c
index 53589d1..af0253f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Architecture specific (i386) functions for kexec based crash dumps.
+ * Architecture specific (i386/x86_64) functions for kexec based crash dumps.
  *
  * Created by: Hariprasad Nellitheertha (hari@in.ibm.com)
  *
 #include <linux/kdebug.h>
 #include <asm/smp.h>
 
+#ifdef X86_32
 #include <mach_ipi.h>
-
+#else
+#include <asm/mach_apic.h>
+#endif
 
 /* This keeps a track of which one is crashing cpu. */
 static int crashing_cpu;
@@ -38,7 +41,9 @@ static int crash_nmi_callback(struct notifier_block *self,
                        unsigned long val, void *data)
 {
        struct pt_regs *regs;
+#ifdef X86_32
        struct pt_regs fixed_regs;
+#endif
        int cpu;
 
        if (val != DIE_NMI_IPI)
@@ -55,10 +60,12 @@ static int crash_nmi_callback(struct notifier_block *self,
                return NOTIFY_STOP;
        local_irq_disable();
 
+#ifdef X86_32
        if (!user_mode_vm(regs)) {
                crash_fixup_ss_esp(&fixed_regs, regs);
                regs = &fixed_regs;
        }
+#endif
        crash_save_cpu(regs, cpu);
        disable_local_APIC();
        atomic_dec(&waiting_for_crash_ipi);