aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/traps_64.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2008-05-24 11:36:33 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-25 16:32:50 -0400
commitc6425b9f143a75bbcd0a7684b4df40e20d0b2f32 (patch)
tree35f999e730579c9b2e783a28b66bd5c6a39bce51 /arch/x86/kernel/traps_64.c
parente56b3a12c45e439169f2d1f7194be397667320a6 (diff)
x86: move do_nmi(), stop_nmi() and restart_nmi() to traps_64.c
traps_32.c already holds these functions so do the same for traps_64.c Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Cc: hpa@zytor.com Cc: mingo@redhat.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/traps_64.c')
-rw-r--r--arch/x86/kernel/traps_64.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c
index 6a048ce3c787..e4a380797dc1 100644
--- a/arch/x86/kernel/traps_64.c
+++ b/arch/x86/kernel/traps_64.c
@@ -76,7 +76,9 @@ asmlinkage void alignment_check(void);
76asmlinkage void machine_check(void); 76asmlinkage void machine_check(void);
77asmlinkage void spurious_interrupt_bug(void); 77asmlinkage void spurious_interrupt_bug(void);
78 78
79int panic_on_unrecovered_nmi;
79static unsigned int code_bytes = 64; 80static unsigned int code_bytes = 64;
81static unsigned ignore_nmis;
80 82
81static inline void conditional_sti(struct pt_regs *regs) 83static inline void conditional_sti(struct pt_regs *regs)
82{ 84{
@@ -867,6 +869,28 @@ asmlinkage notrace __kprobes void default_do_nmi(struct pt_regs *regs)
867 io_check_error(reason, regs); 869 io_check_error(reason, regs);
868} 870}
869 871
872asmlinkage notrace __kprobes void
873do_nmi(struct pt_regs *regs, long error_code)
874{
875 nmi_enter();
876 add_pda(__nmi_count, 1);
877 if (!ignore_nmis)
878 default_do_nmi(regs);
879 nmi_exit();
880}
881
882void stop_nmi(void)
883{
884 acpi_nmi_disable();
885 ignore_nmis++;
886}
887
888void restart_nmi(void)
889{
890 ignore_nmis--;
891 acpi_nmi_enable();
892}
893
870/* runs on IST stack. */ 894/* runs on IST stack. */
871asmlinkage void __kprobes do_int3(struct pt_regs * regs, long error_code) 895asmlinkage void __kprobes do_int3(struct pt_regs * regs, long error_code)
872{ 896{