aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/traps.c
diff options
context:
space:
mode:
authorDon Zickus <dzickus@redhat.com>2006-09-26 04:52:27 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 04:52:27 -0400
commit2fbe7b25c8edaf2d10e6c1a4cc9f8afe714c4764 (patch)
treee4012ae3cd4519cba1836668237f077c60fb1086 /arch/i386/kernel/traps.c
parent957dc87c1bd849440f0eef27e2ade67387001e13 (diff)
[PATCH] i386/x86-64: Remove un/set_nmi_callback and reserve/release_lapic_nmi functions
Removes the un/set_nmi_callback and reserve/release_lapic_nmi functions as they are no longer needed. The various subsystems are modified to register with the die_notifier instead. Also includes compile fixes by Andrew Morton. Signed-off-by: Don Zickus <dzickus@redhat.com> Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/i386/kernel/traps.c')
-rw-r--r--arch/i386/kernel/traps.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index 282f0bd40dfd..7db664d0b25c 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -706,13 +706,6 @@ void die_nmi (struct pt_regs *regs, const char *msg)
706 do_exit(SIGSEGV); 706 do_exit(SIGSEGV);
707} 707}
708 708
709static int dummy_nmi_callback(struct pt_regs * regs, int cpu)
710{
711 return 0;
712}
713
714static nmi_callback_t nmi_callback = dummy_nmi_callback;
715
716static void default_do_nmi(struct pt_regs * regs) 709static void default_do_nmi(struct pt_regs * regs)
717{ 710{
718 unsigned char reason = 0; 711 unsigned char reason = 0;
@@ -732,9 +725,10 @@ static void default_do_nmi(struct pt_regs * regs)
732 */ 725 */
733 if (nmi_watchdog_tick(regs, reason)) 726 if (nmi_watchdog_tick(regs, reason))
734 return; 727 return;
728 if (!do_nmi_callback(regs, smp_processor_id()))
735#endif 729#endif
736 if (!rcu_dereference(nmi_callback)(regs, smp_processor_id()))
737 unknown_nmi_error(reason, regs); 730 unknown_nmi_error(reason, regs);
731
738 return; 732 return;
739 } 733 }
740 if (notify_die(DIE_NMI, "nmi", regs, reason, 2, SIGINT) == NOTIFY_STOP) 734 if (notify_die(DIE_NMI, "nmi", regs, reason, 2, SIGINT) == NOTIFY_STOP)
@@ -765,19 +759,6 @@ fastcall void do_nmi(struct pt_regs * regs, long error_code)
765 nmi_exit(); 759 nmi_exit();
766} 760}
767 761
768void set_nmi_callback(nmi_callback_t callback)
769{
770 vmalloc_sync_all();
771 rcu_assign_pointer(nmi_callback, callback);
772}
773EXPORT_SYMBOL_GPL(set_nmi_callback);
774
775void unset_nmi_callback(void)
776{
777 nmi_callback = dummy_nmi_callback;
778}
779EXPORT_SYMBOL_GPL(unset_nmi_callback);
780
781#ifdef CONFIG_KPROBES 762#ifdef CONFIG_KPROBES
782fastcall void __kprobes do_int3(struct pt_regs *regs, long error_code) 763fastcall void __kprobes do_int3(struct pt_regs *regs, long error_code)
783{ 764{