diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2008-05-24 11:36:33 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-05-25 16:32:50 -0400 |
commit | c6425b9f143a75bbcd0a7684b4df40e20d0b2f32 (patch) | |
tree | 35f999e730579c9b2e783a28b66bd5c6a39bce51 /arch/x86/kernel | |
parent | e56b3a12c45e439169f2d1f7194be397667320a6 (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')
-rw-r--r-- | arch/x86/kernel/nmi_64.c | 25 | ||||
-rw-r--r-- | arch/x86/kernel/traps_64.c | 24 |
2 files changed, 24 insertions, 25 deletions
diff --git a/arch/x86/kernel/nmi_64.c b/arch/x86/kernel/nmi_64.c index 1a98705270a2..c1ea671525e5 100644 --- a/arch/x86/kernel/nmi_64.c +++ b/arch/x86/kernel/nmi_64.c | |||
@@ -30,7 +30,6 @@ | |||
30 | 30 | ||
31 | int unknown_nmi_panic; | 31 | int unknown_nmi_panic; |
32 | int nmi_watchdog_enabled; | 32 | int nmi_watchdog_enabled; |
33 | int panic_on_unrecovered_nmi; | ||
34 | 33 | ||
35 | static cpumask_t backtrace_mask = CPU_MASK_NONE; | 34 | static cpumask_t backtrace_mask = CPU_MASK_NONE; |
36 | 35 | ||
@@ -383,30 +382,6 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason) | |||
383 | return rc; | 382 | return rc; |
384 | } | 383 | } |
385 | 384 | ||
386 | static unsigned ignore_nmis; | ||
387 | |||
388 | asmlinkage notrace __kprobes void | ||
389 | do_nmi(struct pt_regs *regs, long error_code) | ||
390 | { | ||
391 | nmi_enter(); | ||
392 | add_pda(__nmi_count,1); | ||
393 | if (!ignore_nmis) | ||
394 | default_do_nmi(regs); | ||
395 | nmi_exit(); | ||
396 | } | ||
397 | |||
398 | void stop_nmi(void) | ||
399 | { | ||
400 | acpi_nmi_disable(); | ||
401 | ignore_nmis++; | ||
402 | } | ||
403 | |||
404 | void restart_nmi(void) | ||
405 | { | ||
406 | ignore_nmis--; | ||
407 | acpi_nmi_enable(); | ||
408 | } | ||
409 | |||
410 | #ifdef CONFIG_SYSCTL | 385 | #ifdef CONFIG_SYSCTL |
411 | 386 | ||
412 | static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu) | 387 | static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu) |
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); | |||
76 | asmlinkage void machine_check(void); | 76 | asmlinkage void machine_check(void); |
77 | asmlinkage void spurious_interrupt_bug(void); | 77 | asmlinkage void spurious_interrupt_bug(void); |
78 | 78 | ||
79 | int panic_on_unrecovered_nmi; | ||
79 | static unsigned int code_bytes = 64; | 80 | static unsigned int code_bytes = 64; |
81 | static unsigned ignore_nmis; | ||
80 | 82 | ||
81 | static inline void conditional_sti(struct pt_regs *regs) | 83 | static 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 | ||
872 | asmlinkage notrace __kprobes void | ||
873 | do_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 | |||
882 | void stop_nmi(void) | ||
883 | { | ||
884 | acpi_nmi_disable(); | ||
885 | ignore_nmis++; | ||
886 | } | ||
887 | |||
888 | void restart_nmi(void) | ||
889 | { | ||
890 | ignore_nmis--; | ||
891 | acpi_nmi_enable(); | ||
892 | } | ||
893 | |||
870 | /* runs on IST stack. */ | 894 | /* runs on IST stack. */ |
871 | asmlinkage void __kprobes do_int3(struct pt_regs * regs, long error_code) | 895 | asmlinkage void __kprobes do_int3(struct pt_regs * regs, long error_code) |
872 | { | 896 | { |