Commit a8051fde authored by Linus Torvalds's avatar Linus Torvalds

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"
parents 5dfd0621 fdf7be6f
...@@ -68,6 +68,7 @@ obj-$(CONFIG_WAFER_WDT) += wafer5823wdt.o ...@@ -68,6 +68,7 @@ obj-$(CONFIG_WAFER_WDT) += wafer5823wdt.o
obj-$(CONFIG_I6300ESB_WDT) += i6300esb.o obj-$(CONFIG_I6300ESB_WDT) += i6300esb.o
obj-$(CONFIG_ITCO_WDT) += iTCO_wdt.o iTCO_vendor_support.o obj-$(CONFIG_ITCO_WDT) += iTCO_wdt.o iTCO_vendor_support.o
obj-$(CONFIG_IT8712F_WDT) += it8712f_wdt.o obj-$(CONFIG_IT8712F_WDT) += it8712f_wdt.o
CFLAGS_hpwdt.o += -O
obj-$(CONFIG_HP_WATCHDOG) += hpwdt.o obj-$(CONFIG_HP_WATCHDOG) += hpwdt.o
obj-$(CONFIG_SC1200_WDT) += sc1200wdt.o obj-$(CONFIG_SC1200_WDT) += sc1200wdt.o
obj-$(CONFIG_SCx200_WDT) += scx200_wdt.o obj-$(CONFIG_SCx200_WDT) += scx200_wdt.o
......
...@@ -145,8 +145,8 @@ MODULE_DEVICE_TABLE(pci, hpwdt_devices); ...@@ -145,8 +145,8 @@ MODULE_DEVICE_TABLE(pci, hpwdt_devices);
#define HPWDT_ARCH 32 #define HPWDT_ARCH 32
static void asminline_call(struct cmn_registers *pi86Regs, asmlinkage void asminline_call(struct cmn_registers *pi86Regs,
unsigned long *pRomEntry) unsigned long *pRomEntry)
{ {
asm("pushl %ebp \n\t" asm("pushl %ebp \n\t"
"movl %esp, %ebp \n\t" "movl %esp, %ebp \n\t"
...@@ -333,8 +333,8 @@ static int __devinit detect_cru_service(void) ...@@ -333,8 +333,8 @@ static int __devinit detect_cru_service(void)
#define HPWDT_ARCH 64 #define HPWDT_ARCH 64
static void asminline_call(struct cmn_registers *pi86Regs, asmlinkage void asminline_call(struct cmn_registers *pi86Regs,
unsigned long *pRomEntry) unsigned long *pRomEntry)
{ {
asm("pushq %rbp \n\t" asm("pushq %rbp \n\t"
"movq %rsp, %rbp \n\t" "movq %rsp, %rbp \n\t"
...@@ -418,20 +418,23 @@ static int hpwdt_pretimeout(struct notifier_block *nb, unsigned long ulReason, ...@@ -418,20 +418,23 @@ static int hpwdt_pretimeout(struct notifier_block *nb, unsigned long ulReason,
static unsigned long rom_pl; static unsigned long rom_pl;
static int die_nmi_called; static int die_nmi_called;
if (ulReason == DIE_NMI || ulReason == DIE_NMI_IPI) { if (ulReason != DIE_NMI && ulReason != DIE_NMI_IPI)
spin_lock_irqsave(&rom_lock, rom_pl); return NOTIFY_OK;
if (!die_nmi_called)
asminline_call(&cmn_regs, cru_rom_addr); spin_lock_irqsave(&rom_lock, rom_pl);
die_nmi_called = 1; if (!die_nmi_called)
spin_unlock_irqrestore(&rom_lock, rom_pl); asminline_call(&cmn_regs, cru_rom_addr);
if (cmn_regs.u1.ral != 0) { die_nmi_called = 1;
panic("An NMI occurred, please see the Integrated " spin_unlock_irqrestore(&rom_lock, rom_pl);
"Management Log for details.\n"); if (cmn_regs.u1.ral == 0) {
} printk(KERN_WARNING "hpwdt: An NMI occurred, "
"but unable to determine source.\n");
} else {
panic("An NMI occurred, please see the Integrated "
"Management Log for details.\n");
} }
die_nmi_called = 0; return NOTIFY_STOP;
return NOTIFY_DONE;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment