diff options
Diffstat (limited to 'arch/x86_64/kernel/traps.c')
-rw-r--r-- | arch/x86_64/kernel/traps.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index 7b148309c529..edaa9fe654dc 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -69,20 +69,20 @@ asmlinkage void alignment_check(void); | |||
69 | asmlinkage void machine_check(void); | 69 | asmlinkage void machine_check(void); |
70 | asmlinkage void spurious_interrupt_bug(void); | 70 | asmlinkage void spurious_interrupt_bug(void); |
71 | 71 | ||
72 | struct notifier_block *die_chain; | 72 | ATOMIC_NOTIFIER_HEAD(die_chain); |
73 | static DEFINE_SPINLOCK(die_notifier_lock); | ||
74 | 73 | ||
75 | int register_die_notifier(struct notifier_block *nb) | 74 | int register_die_notifier(struct notifier_block *nb) |
76 | { | 75 | { |
77 | int err = 0; | ||
78 | unsigned long flags; | ||
79 | |||
80 | vmalloc_sync_all(); | 76 | vmalloc_sync_all(); |
81 | spin_lock_irqsave(&die_notifier_lock, flags); | 77 | return atomic_notifier_chain_register(&die_chain, nb); |
82 | err = notifier_chain_register(&die_chain, nb); | 78 | } |
83 | spin_unlock_irqrestore(&die_notifier_lock, flags); | 79 | EXPORT_SYMBOL(register_die_notifier); |
84 | return err; | 80 | |
81 | int unregister_die_notifier(struct notifier_block *nb) | ||
82 | { | ||
83 | return atomic_notifier_chain_unregister(&die_chain, nb); | ||
85 | } | 84 | } |
85 | EXPORT_SYMBOL(unregister_die_notifier); | ||
86 | 86 | ||
87 | static inline void conditional_sti(struct pt_regs *regs) | 87 | static inline void conditional_sti(struct pt_regs *regs) |
88 | { | 88 | { |