diff options
Diffstat (limited to 'arch/x86/kernel/apic/hw_nmi.c')
-rw-r--r-- | arch/x86/kernel/apic/hw_nmi.c | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/arch/x86/kernel/apic/hw_nmi.c b/arch/x86/kernel/apic/hw_nmi.c index d5e57db0f7be..31cb9ae992b7 100644 --- a/arch/x86/kernel/apic/hw_nmi.c +++ b/arch/x86/kernel/apic/hw_nmi.c | |||
@@ -60,22 +60,10 @@ void arch_trigger_all_cpu_backtrace(void) | |||
60 | } | 60 | } |
61 | 61 | ||
62 | static int __kprobes | 62 | static int __kprobes |
63 | arch_trigger_all_cpu_backtrace_handler(struct notifier_block *self, | 63 | arch_trigger_all_cpu_backtrace_handler(unsigned int cmd, struct pt_regs *regs) |
64 | unsigned long cmd, void *__args) | ||
65 | { | 64 | { |
66 | struct die_args *args = __args; | ||
67 | struct pt_regs *regs; | ||
68 | int cpu; | 65 | int cpu; |
69 | 66 | ||
70 | switch (cmd) { | ||
71 | case DIE_NMI: | ||
72 | break; | ||
73 | |||
74 | default: | ||
75 | return NOTIFY_DONE; | ||
76 | } | ||
77 | |||
78 | regs = args->regs; | ||
79 | cpu = smp_processor_id(); | 67 | cpu = smp_processor_id(); |
80 | 68 | ||
81 | if (cpumask_test_cpu(cpu, to_cpumask(backtrace_mask))) { | 69 | if (cpumask_test_cpu(cpu, to_cpumask(backtrace_mask))) { |
@@ -86,21 +74,16 @@ arch_trigger_all_cpu_backtrace_handler(struct notifier_block *self, | |||
86 | show_regs(regs); | 74 | show_regs(regs); |
87 | arch_spin_unlock(&lock); | 75 | arch_spin_unlock(&lock); |
88 | cpumask_clear_cpu(cpu, to_cpumask(backtrace_mask)); | 76 | cpumask_clear_cpu(cpu, to_cpumask(backtrace_mask)); |
89 | return NOTIFY_STOP; | 77 | return NMI_HANDLED; |
90 | } | 78 | } |
91 | 79 | ||
92 | return NOTIFY_DONE; | 80 | return NMI_DONE; |
93 | } | 81 | } |
94 | 82 | ||
95 | static __read_mostly struct notifier_block backtrace_notifier = { | ||
96 | .notifier_call = arch_trigger_all_cpu_backtrace_handler, | ||
97 | .next = NULL, | ||
98 | .priority = NMI_LOCAL_LOW_PRIOR, | ||
99 | }; | ||
100 | |||
101 | static int __init register_trigger_all_cpu_backtrace(void) | 83 | static int __init register_trigger_all_cpu_backtrace(void) |
102 | { | 84 | { |
103 | register_die_notifier(&backtrace_notifier); | 85 | register_nmi_handler(NMI_LOCAL, arch_trigger_all_cpu_backtrace_handler, |
86 | 0, "arch_bt"); | ||
104 | return 0; | 87 | return 0; |
105 | } | 88 | } |
106 | early_initcall(register_trigger_all_cpu_backtrace); | 89 | early_initcall(register_trigger_all_cpu_backtrace); |