diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-08 06:17:08 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 06:17:08 -0400 |
commit | 4b62ac9a2b859f932afd5625362c927111b7dd9b (patch) | |
tree | 30b159e2a0ffa635488feae5587640a7c21372f3 /arch/x86/kernel/traps_64.c | |
parent | 2b4fa851b2f06fdb04cac808b57324f5e51e1578 (diff) | |
parent | 8700600a74852d75eb965b969dcf9f58e2b32546 (diff) |
Merge branch 'x86/nmi' into x86/devel
Conflicts:
arch/x86/kernel/nmi.c
arch/x86/kernel/nmi_32.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/traps_64.c')
-rw-r--r-- | arch/x86/kernel/traps_64.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c index ec6d3b2130c4..80ba6d37bfe0 100644 --- a/arch/x86/kernel/traps_64.c +++ b/arch/x86/kernel/traps_64.c | |||
@@ -75,7 +75,9 @@ asmlinkage void alignment_check(void); | |||
75 | asmlinkage void machine_check(void); | 75 | asmlinkage void machine_check(void); |
76 | asmlinkage void spurious_interrupt_bug(void); | 76 | asmlinkage void spurious_interrupt_bug(void); |
77 | 77 | ||
78 | int panic_on_unrecovered_nmi; | ||
78 | static unsigned int code_bytes = 64; | 79 | static unsigned int code_bytes = 64; |
80 | static unsigned ignore_nmis; | ||
79 | 81 | ||
80 | static inline void conditional_sti(struct pt_regs *regs) | 82 | static inline void conditional_sti(struct pt_regs *regs) |
81 | { | 83 | { |
@@ -613,7 +615,9 @@ die_nmi(char *str, struct pt_regs *regs, int do_panic) | |||
613 | * We are in trouble anyway, lets at least try | 615 | * We are in trouble anyway, lets at least try |
614 | * to get a message out. | 616 | * to get a message out. |
615 | */ | 617 | */ |
616 | printk(str, smp_processor_id()); | 618 | printk(KERN_EMERG "%s", str); |
619 | printk(" on CPU%d, ip %08lx, registers:\n", | ||
620 | smp_processor_id(), regs->ip); | ||
617 | show_registers(regs); | 621 | show_registers(regs); |
618 | if (kexec_should_crash(current)) | 622 | if (kexec_should_crash(current)) |
619 | crash_kexec(regs); | 623 | crash_kexec(regs); |
@@ -862,6 +866,28 @@ asmlinkage notrace __kprobes void default_do_nmi(struct pt_regs *regs) | |||
862 | io_check_error(reason, regs); | 866 | io_check_error(reason, regs); |
863 | } | 867 | } |
864 | 868 | ||
869 | asmlinkage notrace __kprobes void | ||
870 | do_nmi(struct pt_regs *regs, long error_code) | ||
871 | { | ||
872 | nmi_enter(); | ||
873 | add_pda(__nmi_count, 1); | ||
874 | if (!ignore_nmis) | ||
875 | default_do_nmi(regs); | ||
876 | nmi_exit(); | ||
877 | } | ||
878 | |||
879 | void stop_nmi(void) | ||
880 | { | ||
881 | acpi_nmi_disable(); | ||
882 | ignore_nmis++; | ||
883 | } | ||
884 | |||
885 | void restart_nmi(void) | ||
886 | { | ||
887 | ignore_nmis--; | ||
888 | acpi_nmi_enable(); | ||
889 | } | ||
890 | |||
865 | /* runs on IST stack. */ | 891 | /* runs on IST stack. */ |
866 | asmlinkage void __kprobes do_int3(struct pt_regs * regs, long error_code) | 892 | asmlinkage void __kprobes do_int3(struct pt_regs * regs, long error_code) |
867 | { | 893 | { |