diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-21 22:25:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-21 22:25:14 -0400 |
commit | 5ec29e3149d800e6db83c1b6ff441daf319cbbe2 (patch) | |
tree | b23ecaff7078590215e91b2b6aa4c90c2d923e10 /drivers/watchdog | |
parent | abd209b7083b2f3a2a19e522f688e7569f284e5d (diff) | |
parent | 6ff968cca1dfebd4b6fcade87c11658dbfc96932 (diff) |
Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core locking updates from Ingo Molnar:
"This update:
- extends and simplifies x86 NMI callback handling code to enhance
and fix the HP hw-watchdog driver
- simplifies the x86 NMI callback handling code to fix a kmemcheck
bug.
- enhances the hung-task debugger"
* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/nmi: Fix the type of the nmiaction.flags field
x86/nmi: Fix page faults by nmiaction if kmemcheck is enabled
x86/nmi: Add new NMI queues to deal with IO_CHK and SERR
watchdog, hpwdt: Remove priority option for NMI callback
hung task debugging: Inject NMI when hung and going to panic
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/hpwdt.c | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 9f13b897fd64..23885f2d56a0 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c | |||
@@ -147,7 +147,6 @@ struct cmn_registers { | |||
147 | 147 | ||
148 | static unsigned int hpwdt_nmi_decoding; | 148 | static unsigned int hpwdt_nmi_decoding; |
149 | static unsigned int allow_kdump; | 149 | static unsigned int allow_kdump; |
150 | static unsigned int priority; /* hpwdt at end of die_notify list */ | ||
151 | static unsigned int is_icru; | 150 | static unsigned int is_icru; |
152 | static DEFINE_SPINLOCK(rom_lock); | 151 | static DEFINE_SPINLOCK(rom_lock); |
153 | static void *cru_rom_addr; | 152 | static void *cru_rom_addr; |
@@ -723,28 +722,35 @@ static int __devinit hpwdt_init_nmi_decoding(struct pci_dev *dev) | |||
723 | } | 722 | } |
724 | 723 | ||
725 | /* | 724 | /* |
726 | * If the priority is set to 1, then we will be put first on the | 725 | * Only one function can register for NMI_UNKNOWN |
727 | * die notify list to handle a critical NMI. The default is to | ||
728 | * be last so other users of the NMI signal can function. | ||
729 | */ | 726 | */ |
730 | retval = register_nmi_handler(NMI_UNKNOWN, hpwdt_pretimeout, | 727 | retval = register_nmi_handler(NMI_UNKNOWN, hpwdt_pretimeout, 0, "hpwdt"); |
731 | (priority) ? NMI_FLAG_FIRST : 0, | 728 | if (retval) |
732 | "hpwdt"); | 729 | goto error; |
733 | if (retval != 0) { | 730 | retval = register_nmi_handler(NMI_SERR, hpwdt_pretimeout, 0, "hpwdt"); |
734 | dev_warn(&dev->dev, | 731 | if (retval) |
735 | "Unable to register a die notifier (err=%d).\n", | 732 | goto error1; |
736 | retval); | 733 | retval = register_nmi_handler(NMI_IO_CHECK, hpwdt_pretimeout, 0, "hpwdt"); |
737 | if (cru_rom_addr) | 734 | if (retval) |
738 | iounmap(cru_rom_addr); | 735 | goto error2; |
739 | } | ||
740 | 736 | ||
741 | dev_info(&dev->dev, | 737 | dev_info(&dev->dev, |
742 | "HP Watchdog Timer Driver: NMI decoding initialized" | 738 | "HP Watchdog Timer Driver: NMI decoding initialized" |
743 | ", allow kernel dump: %s (default = 0/OFF)" | 739 | ", allow kernel dump: %s (default = 0/OFF)\n", |
744 | ", priority: %s (default = 0/LAST).\n", | 740 | (allow_kdump == 0) ? "OFF" : "ON"); |
745 | (allow_kdump == 0) ? "OFF" : "ON", | ||
746 | (priority == 0) ? "LAST" : "FIRST"); | ||
747 | return 0; | 741 | return 0; |
742 | |||
743 | error2: | ||
744 | unregister_nmi_handler(NMI_SERR, "hpwdt"); | ||
745 | error1: | ||
746 | unregister_nmi_handler(NMI_UNKNOWN, "hpwdt"); | ||
747 | error: | ||
748 | dev_warn(&dev->dev, | ||
749 | "Unable to register a die notifier (err=%d).\n", | ||
750 | retval); | ||
751 | if (cru_rom_addr) | ||
752 | iounmap(cru_rom_addr); | ||
753 | return retval; | ||
748 | } | 754 | } |
749 | 755 | ||
750 | static void hpwdt_exit_nmi_decoding(void) | 756 | static void hpwdt_exit_nmi_decoding(void) |
@@ -881,10 +887,6 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" | |||
881 | #ifdef CONFIG_HPWDT_NMI_DECODING | 887 | #ifdef CONFIG_HPWDT_NMI_DECODING |
882 | module_param(allow_kdump, int, 0); | 888 | module_param(allow_kdump, int, 0); |
883 | MODULE_PARM_DESC(allow_kdump, "Start a kernel dump after NMI occurs"); | 889 | MODULE_PARM_DESC(allow_kdump, "Start a kernel dump after NMI occurs"); |
884 | |||
885 | module_param(priority, int, 0); | ||
886 | MODULE_PARM_DESC(priority, "The hpwdt driver handles NMIs first or last" | ||
887 | " (default = 0/Last)\n"); | ||
888 | #endif /* !CONFIG_HPWDT_NMI_DECODING */ | 890 | #endif /* !CONFIG_HPWDT_NMI_DECODING */ |
889 | 891 | ||
890 | module_init(hpwdt_init); | 892 | module_init(hpwdt_init); |