summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/traps_64.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-08 12:17:08 +0200
committerIngo Molnar <mingo@elte.hu>2008-07-08 12:17:08 +0200
commit4b62ac9a2b859f932afd5625362c927111b7dd9b (patch)
tree30b159e2a0ffa635488feae5587640a7c21372f3 /arch/x86/kernel/traps_64.c
parent2b4fa851b2f06fdb04cac808b57324f5e51e1578 (diff)
parent8700600a74852d75eb965b969dcf9f58e2b32546 (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.c28
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);
asmlinkage void machine_check(void);
asmlinkage void spurious_interrupt_bug(void);
+int panic_on_unrecovered_nmi;
static unsigned int code_bytes = 64;
+static unsigned ignore_nmis;
static inline void conditional_sti(struct pt_regs *regs)
{
@@ -613,7 +615,9 @@ die_nmi(char *str, struct pt_regs *regs, int do_panic)
* We are in trouble anyway, lets at least try
* to get a message out.
*/
- printk(str, smp_processor_id());
+ printk(KERN_EMERG "%s", str);
+ printk(" on CPU%d, ip %08lx, registers:\n",
+ smp_processor_id(), regs->ip);
show_registers(regs);
if (kexec_should_crash(current))
crash_kexec(regs);
@@ -862,6 +866,28 @@ asmlinkage notrace __kprobes void default_do_nmi(struct pt_regs *regs)
io_check_error(reason, regs);
}
+asmlinkage notrace __kprobes void
+do_nmi(struct pt_regs *regs, long error_code)
+{
+ nmi_enter();
+ add_pda(__nmi_count, 1);
+ if (!ignore_nmis)
+ default_do_nmi(regs);
+ nmi_exit();
+}
+
+void stop_nmi(void)
+{
+ acpi_nmi_disable();
+ ignore_nmis++;
+}
+
+void restart_nmi(void)
+{
+ ignore_nmis--;
+ acpi_nmi_enable();
+}
+
/* runs on IST stack. */
asmlinkage void __kprobes do_int3(struct pt_regs * regs, long error_code)
{