diff options
author | David S. Miller <davem@davemloft.net> | 2009-03-29 18:40:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-29 18:40:33 -0400 |
commit | ffaba674090f287afe0c44fd8d978c64c03581a8 (patch) | |
tree | 6b57fd6357530e78c39bff7f07e7baae703af54c /arch | |
parent | 07d43ba98621f08e252a48c96b258b4d572b0257 (diff) |
sparc64: Fix reset hangs on Niagara systems.
Hypervisor versions older than version 1.6.1 cannot handle
leaving the profile counter overflow interrupt chirping
when the system does a soft reset.
So use a reboot notifier to shut off the NMI watchdog.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/kernel/nmi.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c index f3577223c863..2c0cc72d295b 100644 --- a/arch/sparc/kernel/nmi.c +++ b/arch/sparc/kernel/nmi.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/kprobes.h> | 14 | #include <linux/kprobes.h> |
15 | #include <linux/kernel_stat.h> | 15 | #include <linux/kernel_stat.h> |
16 | #include <linux/reboot.h> | ||
16 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
17 | #include <linux/kdebug.h> | 18 | #include <linux/kdebug.h> |
18 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
@@ -206,13 +207,33 @@ void nmi_adjust_hz(unsigned int new_hz) | |||
206 | } | 207 | } |
207 | EXPORT_SYMBOL_GPL(nmi_adjust_hz); | 208 | EXPORT_SYMBOL_GPL(nmi_adjust_hz); |
208 | 209 | ||
210 | static int nmi_shutdown(struct notifier_block *nb, unsigned long cmd, void *p) | ||
211 | { | ||
212 | on_each_cpu(stop_watchdog, NULL, 1); | ||
213 | return 0; | ||
214 | } | ||
215 | |||
216 | static struct notifier_block nmi_reboot_notifier = { | ||
217 | .notifier_call = nmi_shutdown, | ||
218 | }; | ||
219 | |||
209 | int __init nmi_init(void) | 220 | int __init nmi_init(void) |
210 | { | 221 | { |
222 | int err; | ||
223 | |||
211 | nmi_usable = 1; | 224 | nmi_usable = 1; |
212 | 225 | ||
213 | on_each_cpu(start_watchdog, NULL, 1); | 226 | on_each_cpu(start_watchdog, NULL, 1); |
214 | 227 | ||
215 | return check_nmi_watchdog(); | 228 | err = check_nmi_watchdog(); |
229 | if (!err) { | ||
230 | err = register_reboot_notifier(&nmi_reboot_notifier); | ||
231 | if (err) { | ||
232 | nmi_usable = 0; | ||
233 | on_each_cpu(stop_watchdog, NULL, 1); | ||
234 | } | ||
235 | } | ||
236 | return err; | ||
216 | } | 237 | } |
217 | 238 | ||
218 | static int __init setup_nmi_watchdog(char *str) | 239 | static int __init setup_nmi_watchdog(char *str) |