summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/nmi.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2014-02-03 21:02:09 +0400
committerIngo Molnar <mingo@kernel.org>2014-02-09 16:17:22 +0400
commite90c78535283dd0ded3bf2e484890d14dba2d527 (patch)
tree349fe1e8b7d7dc6ea7c78a0d1403b7ca74c2f387 /arch/x86/include/asm/nmi.h
parent6a02ad66b2c44155d529f430d4fa5c6c66321077 (diff)
downloadlinux-e90c78535283dd0ded3bf2e484890d14dba2d527.tar.xz
x86/nmi: Push duration printk() to irq context
Calling printk() from NMI context is bad (TM), so move it to IRQ context. In doing so we slightly change (probably wreck) the debugfs nmi_longest_ns thingy, in that it doesn't update to reflect the longest, nor does writing to it reset the count. Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: Don Zickus <dzickus@redhat.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Link: http://lkml.kernel.org/n/tip-rdw0au56a5ymis1u8p48c12d@git.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/nmi.h')
-rw-r--r--arch/x86/include/asm/nmi.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/include/asm/nmi.h b/arch/x86/include/asm/nmi.h
index 86f9301903c8..5f2fc4441b11 100644
--- a/arch/x86/include/asm/nmi.h
+++ b/arch/x86/include/asm/nmi.h
@@ -1,6 +1,7 @@
#ifndef _ASM_X86_NMI_H
#define _ASM_X86_NMI_H
+#include <linux/irq_work.h>
#include <linux/pm.h>
#include <asm/irq.h>
#include <asm/io.h>
@@ -38,6 +39,8 @@ typedef int (*nmi_handler_t)(unsigned int, struct pt_regs *);
struct nmiaction {
struct list_head list;
nmi_handler_t handler;
+ u64 max_duration;
+ struct irq_work irq_work;
unsigned long flags;
const char *name;
};