X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fi386%2Fkernel%2Fcrash.c;fp=arch%2Fi386%2Fkernel%2Fcrash.c;h=d49dbe8dc96b345efa52c579e96782db3ecc3b3b;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=5b96f038367f4481dca597f7c32e771efbf3fcfc;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/arch/i386/kernel/crash.c b/arch/i386/kernel/crash.c index 5b96f0383..d49dbe8dc 100644 --- a/arch/i386/kernel/crash.c +++ b/arch/i386/kernel/crash.c @@ -69,7 +69,7 @@ static void crash_save_this_cpu(struct pt_regs *regs, int cpu) * for the data I pass, and I need tags * on the data to indicate what information I have * squirrelled away. ELF notes happen to provide - * all of that, so there is no need to invent something new. + * all of that that no need to invent something new. */ buf = (u32*)per_cpu_ptr(crash_notes, cpu); if (!buf) @@ -90,7 +90,7 @@ static void crash_save_self(struct pt_regs *regs) crash_save_this_cpu(regs, cpu); } -#if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC) +#ifdef CONFIG_SMP static atomic_t waiting_for_crash_ipi; static int crash_nmi_callback(struct pt_regs *regs, int cpu) @@ -105,7 +105,7 @@ static int crash_nmi_callback(struct pt_regs *regs, int cpu) return 1; local_irq_disable(); - if (!user_mode_vm(regs)) { + if (!user_mode(regs)) { crash_fixup_ss_esp(&fixed_regs, regs); regs = &fixed_regs; } @@ -114,15 +114,19 @@ static int crash_nmi_callback(struct pt_regs *regs, int cpu) atomic_dec(&waiting_for_crash_ipi); /* Assume hlt works */ halt(); - for (;;) - cpu_relax(); + for(;;); return 1; } +/* + * By using the NMI code instead of a vector we just sneak thru the + * word generator coming out with just what we want. AND it does + * not matter if clustered_apic_mode is set or not. + */ static void smp_send_nmi_allbutself(void) { - send_IPI_allbutself(NMI_VECTOR); + send_IPI_allbutself(APIC_DM_NMI); } static void nmi_shootdown_cpus(void) @@ -158,7 +162,7 @@ static void nmi_shootdown_cpus(void) void machine_crash_shutdown(struct pt_regs *regs) { /* This function is only called after the system - * has panicked or is otherwise in a critical state. + * has paniced or is otherwise in a critical state. * The minimum amount of code to allow a kexec'd kernel * to run successfully needs to happen here. *