Skip to content

Commit

Permalink
x86: unify crash_32/64.c
Browse files Browse the repository at this point in the history
Most of contents in crash are same.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Hiroshi Shimamoto authored and Thomas Gleixner committed Oct 23, 2007
1 parent 92f98b1 commit 62a31a0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 139 deletions.
2 changes: 1 addition & 1 deletion arch/x86/kernel/Makefile_32
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ obj-$(CONFIG_X86_MPPARSE) += mpparse_32.o
obj-$(CONFIG_X86_LOCAL_APIC) += apic_32.o nmi_32.o
obj-$(CONFIG_X86_IO_APIC) += io_apic_32.o
obj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups_32.o
obj-$(CONFIG_KEXEC) += machine_kexec_32.o relocate_kernel_32.o crash_32.o
obj-$(CONFIG_KEXEC) += machine_kexec_32.o relocate_kernel_32.o crash.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump_32.o
obj-$(CONFIG_X86_NUMAQ) += numaq_32.o
obj-$(CONFIG_X86_SUMMIT_NUMA) += summit_32.o
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/Makefile_64
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ obj-$(CONFIG_X86_CPUID) += cpuid.o
obj-$(CONFIG_SMP) += smp_64.o smpboot_64.o trampoline_64.o tsc_sync.o
obj-y += apic_64.o nmi_64.o
obj-y += io_apic_64.o mpparse_64.o genapic_64.o genapic_flat_64.o
obj-$(CONFIG_KEXEC) += machine_kexec_64.o relocate_kernel_64.o crash_64.o
obj-$(CONFIG_KEXEC) += machine_kexec_64.o relocate_kernel_64.o crash.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump_64.o
obj-$(CONFIG_PM) += suspend_64.o
obj-$(CONFIG_HIBERNATION) += suspend_asm_64.o
Expand Down
11 changes: 9 additions & 2 deletions arch/x86/kernel/crash_32.c → arch/x86/kernel/crash.c
Original file line number Diff line number Diff line change
@@ -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)
*
Expand All @@ -25,8 +25,11 @@
#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;
Expand All @@ -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)
Expand All @@ -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);
Expand Down
135 changes: 0 additions & 135 deletions arch/x86/kernel/crash_64.c

This file was deleted.

0 comments on commit 62a31a0

Please sign in to comment.