aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/hpwdt.c
diff options
context:
space:
mode:
authorDon Zickus <dzickus@redhat.com>2012-03-29 16:11:15 -0400
committerIngo Molnar <mingo@kernel.org>2012-04-25 06:43:33 -0400
commit09ee10143658cd021d879ead61ead72a196302b6 (patch)
treeb3f959e343c58f553b1b14c7f81a54b11a25b0dd /drivers/watchdog/hpwdt.c
parent625056b65ee9a8b4caf42136e0c844c15e6ec54f (diff)
watchdog, hpwdt: Remove priority option for NMI callback
The NMI_UNKNOWN bucket only allows for one function to register to it. The reason for that is because only functions which can not determine if the NMI belongs to them or not should register and would like to assume/swallow any NMI they see. As a result it doesn't make sense to let more than one function like this register. In fact, letting a second function fail allows us to know that more than one function is going to swallow NMIs on the current system. This is better than silently being ignored. Therefore hpwdt's priority mechanism doesn't make sense any more. They will be always first on the NMI_UNKNOWN queue, if they register. Removing this parameter cleans up the code and simplifies things for the next patch which changes how nmis are registered. Signed-off-by: Don Zickus <dzickus@redhat.com> Cc: Thomas Mingarelli <thomas.mingarelli@hp.com> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Andrew Morton <akpm@linux-foundation.org> Link: http://lkml.kernel.org/r/1333051877-15755-2-git-send-email-dzickus@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/watchdog/hpwdt.c')
-rw-r--r--drivers/watchdog/hpwdt.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index cbc7ceef2786..4000b8038cac 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -147,7 +147,6 @@ struct cmn_registers {
147 147
148static unsigned int hpwdt_nmi_decoding; 148static unsigned int hpwdt_nmi_decoding;
149static unsigned int allow_kdump; 149static unsigned int allow_kdump;
150static unsigned int priority; /* hpwdt at end of die_notify list */
151static unsigned int is_icru; 150static unsigned int is_icru;
152static DEFINE_SPINLOCK(rom_lock); 151static DEFINE_SPINLOCK(rom_lock);
153static void *cru_rom_addr; 152static void *cru_rom_addr;
@@ -723,13 +722,9 @@ 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,
732 "hpwdt");
733 if (retval != 0) { 728 if (retval != 0) {
734 dev_warn(&dev->dev, 729 dev_warn(&dev->dev,
735 "Unable to register a die notifier (err=%d).\n", 730 "Unable to register a die notifier (err=%d).\n",
@@ -740,10 +735,8 @@ static int __devinit hpwdt_init_nmi_decoding(struct pci_dev *dev)
740 735
741 dev_info(&dev->dev, 736 dev_info(&dev->dev,
742 "HP Watchdog Timer Driver: NMI decoding initialized" 737 "HP Watchdog Timer Driver: NMI decoding initialized"
743 ", allow kernel dump: %s (default = 0/OFF)" 738 ", allow kernel dump: %s (default = 0/OFF)\n",
744 ", priority: %s (default = 0/LAST).\n", 739 (allow_kdump == 0) ? "OFF" : "ON");
745 (allow_kdump == 0) ? "OFF" : "ON",
746 (priority == 0) ? "LAST" : "FIRST");
747 return 0; 740 return 0;
748} 741}
749 742
@@ -881,10 +874,6 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
881#ifdef CONFIG_HPWDT_NMI_DECODING 874#ifdef CONFIG_HPWDT_NMI_DECODING
882module_param(allow_kdump, int, 0); 875module_param(allow_kdump, int, 0);
883MODULE_PARM_DESC(allow_kdump, "Start a kernel dump after NMI occurs"); 876MODULE_PARM_DESC(allow_kdump, "Start a kernel dump after NMI occurs");
884
885module_param(priority, int, 0);
886MODULE_PARM_DESC(priority, "The hpwdt driver handles NMIs first or last"
887 " (default = 0/Last)\n");
888#endif /* !CONFIG_HPWDT_NMI_DECODING */ 877#endif /* !CONFIG_HPWDT_NMI_DECODING */
889 878
890module_init(hpwdt_init); 879module_init(hpwdt_init);