diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-06-18 15:55:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-06-18 15:55:00 -0400 |
commit | a8051fde6b71ac9a0e63c861c81c59ba776175f9 (patch) | |
tree | f6451c14bca538e01ec4a364f5f628870322181e /drivers | |
parent | 5dfd06215b951de70b3e610de47813811c822a44 (diff) | |
parent | fdf7be6f13b920f0d80c249c70f794a2f6d53992 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
Revert "[WATCHDOG] hpwdt: Fix NMI handling."
[WATCHDOG] hpwdt: Add CFLAGS to get driver working
Revert "[WATCHDOG] make watchdog/hpwdt.c:asminline_call() static"
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/watchdog/Makefile | 1 | ||||
-rw-r--r-- | drivers/watchdog/hpwdt.c | 35 |
2 files changed, 20 insertions, 16 deletions
diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile index 25b352b664d9..8662a6b7a30b 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile | |||
@@ -68,6 +68,7 @@ obj-$(CONFIG_WAFER_WDT) += wafer5823wdt.o | |||
68 | obj-$(CONFIG_I6300ESB_WDT) += i6300esb.o | 68 | obj-$(CONFIG_I6300ESB_WDT) += i6300esb.o |
69 | obj-$(CONFIG_ITCO_WDT) += iTCO_wdt.o iTCO_vendor_support.o | 69 | obj-$(CONFIG_ITCO_WDT) += iTCO_wdt.o iTCO_vendor_support.o |
70 | obj-$(CONFIG_IT8712F_WDT) += it8712f_wdt.o | 70 | obj-$(CONFIG_IT8712F_WDT) += it8712f_wdt.o |
71 | CFLAGS_hpwdt.o += -O | ||
71 | obj-$(CONFIG_HP_WATCHDOG) += hpwdt.o | 72 | obj-$(CONFIG_HP_WATCHDOG) += hpwdt.o |
72 | obj-$(CONFIG_SC1200_WDT) += sc1200wdt.o | 73 | obj-$(CONFIG_SC1200_WDT) += sc1200wdt.o |
73 | obj-$(CONFIG_SCx200_WDT) += scx200_wdt.o | 74 | obj-$(CONFIG_SCx200_WDT) += scx200_wdt.o |
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 6a63535fc04d..2686f3eaeedf 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c | |||
@@ -145,8 +145,8 @@ MODULE_DEVICE_TABLE(pci, hpwdt_devices); | |||
145 | 145 | ||
146 | #define HPWDT_ARCH 32 | 146 | #define HPWDT_ARCH 32 |
147 | 147 | ||
148 | static void asminline_call(struct cmn_registers *pi86Regs, | 148 | asmlinkage void asminline_call(struct cmn_registers *pi86Regs, |
149 | unsigned long *pRomEntry) | 149 | unsigned long *pRomEntry) |
150 | { | 150 | { |
151 | asm("pushl %ebp \n\t" | 151 | asm("pushl %ebp \n\t" |
152 | "movl %esp, %ebp \n\t" | 152 | "movl %esp, %ebp \n\t" |
@@ -333,8 +333,8 @@ static int __devinit detect_cru_service(void) | |||
333 | 333 | ||
334 | #define HPWDT_ARCH 64 | 334 | #define HPWDT_ARCH 64 |
335 | 335 | ||
336 | static void asminline_call(struct cmn_registers *pi86Regs, | 336 | asmlinkage void asminline_call(struct cmn_registers *pi86Regs, |
337 | unsigned long *pRomEntry) | 337 | unsigned long *pRomEntry) |
338 | { | 338 | { |
339 | asm("pushq %rbp \n\t" | 339 | asm("pushq %rbp \n\t" |
340 | "movq %rsp, %rbp \n\t" | 340 | "movq %rsp, %rbp \n\t" |
@@ -418,20 +418,23 @@ static int hpwdt_pretimeout(struct notifier_block *nb, unsigned long ulReason, | |||
418 | static unsigned long rom_pl; | 418 | static unsigned long rom_pl; |
419 | static int die_nmi_called; | 419 | static int die_nmi_called; |
420 | 420 | ||
421 | if (ulReason == DIE_NMI || ulReason == DIE_NMI_IPI) { | 421 | if (ulReason != DIE_NMI && ulReason != DIE_NMI_IPI) |
422 | spin_lock_irqsave(&rom_lock, rom_pl); | 422 | return NOTIFY_OK; |
423 | if (!die_nmi_called) | 423 | |
424 | asminline_call(&cmn_regs, cru_rom_addr); | 424 | spin_lock_irqsave(&rom_lock, rom_pl); |
425 | die_nmi_called = 1; | 425 | if (!die_nmi_called) |
426 | spin_unlock_irqrestore(&rom_lock, rom_pl); | 426 | asminline_call(&cmn_regs, cru_rom_addr); |
427 | if (cmn_regs.u1.ral != 0) { | 427 | die_nmi_called = 1; |
428 | panic("An NMI occurred, please see the Integrated " | 428 | spin_unlock_irqrestore(&rom_lock, rom_pl); |
429 | "Management Log for details.\n"); | 429 | if (cmn_regs.u1.ral == 0) { |
430 | } | 430 | printk(KERN_WARNING "hpwdt: An NMI occurred, " |
431 | "but unable to determine source.\n"); | ||
432 | } else { | ||
433 | panic("An NMI occurred, please see the Integrated " | ||
434 | "Management Log for details.\n"); | ||
431 | } | 435 | } |
432 | 436 | ||
433 | die_nmi_called = 0; | 437 | return NOTIFY_STOP; |
434 | return NOTIFY_DONE; | ||
435 | } | 438 | } |
436 | 439 | ||
437 | /* | 440 | /* |