diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2008-05-24 19:36:33 +0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-25 22:32:50 +0200 |
commit | c6425b9f143a75bbcd0a7684b4df40e20d0b2f32 (patch) | |
tree | 35f999e730579c9b2e783a28b66bd5c6a39bce51 /arch/x86/kernel/traps_64.c | |
parent | e56b3a12c45e439169f2d1f7194be397667320a6 (diff) | |
download | blackbird-op-linux-c6425b9f143a75bbcd0a7684b4df40e20d0b2f32.tar.gz blackbird-op-linux-c6425b9f143a75bbcd0a7684b4df40e20d0b2f32.zip |
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.c | 24 |
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); 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) { @@ -867,6 +869,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) { |