diff options
author | David S. Miller <davem@davemloft.net> | 2009-03-30 00:40:33 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-30 00:40:33 +0200 |
commit | ffaba674090f287afe0c44fd8d978c64c03581a8 (patch) | |
tree | 6b57fd6357530e78c39bff7f07e7baae703af54c /arch/sparc/kernel | |
parent | Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6 (diff) | |
download | linux-ffaba674090f287afe0c44fd8d978c64c03581a8.tar.xz linux-ffaba674090f287afe0c44fd8d978c64c03581a8.zip |
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/sparc/kernel')
-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 @@ #include <linux/module.h> #include <linux/kprobes.h> #include <linux/kernel_stat.h> +#include <linux/reboot.h> #include <linux/slab.h> #include <linux/kdebug.h> #include <linux/delay.h> @@ -206,13 +207,33 @@ void nmi_adjust_hz(unsigned int new_hz) } EXPORT_SYMBOL_GPL(nmi_adjust_hz); +static int nmi_shutdown(struct notifier_block *nb, unsigned long cmd, void *p) +{ + on_each_cpu(stop_watchdog, NULL, 1); + return 0; +} + +static struct notifier_block nmi_reboot_notifier = { + .notifier_call = nmi_shutdown, +}; + int __init nmi_init(void) { + int err; + nmi_usable = 1; on_each_cpu(start_watchdog, NULL, 1); - return check_nmi_watchdog(); + err = check_nmi_watchdog(); + if (!err) { + err = register_reboot_notifier(&nmi_reboot_notifier); + if (err) { + nmi_usable = 0; + on_each_cpu(stop_watchdog, NULL, 1); + } + } + return err; } static int __init setup_nmi_watchdog(char *str) |