Commit 7f7f894c authored by Mingarelli, Thomas's avatar Mingarelli, Thomas Committed by Wim Van Sebroeck

[WATCHDOG] hpwdt: Fix NMI handling.

I need to just return in case it's not my NMI so someone else can take a look
at it (and reset die_nmi_called to 0 in case I actually do get one that's mine
to handle).
Signed-off-by: default avatarThomas Mingarelli <thomas.mingarelli@hp.com>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 93539b19
...@@ -418,23 +418,20 @@ static int hpwdt_pretimeout(struct notifier_block *nb, unsigned long ulReason, ...@@ -418,23 +418,20 @@ 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) {
return NOTIFY_OK; spin_lock_irqsave(&rom_lock, rom_pl);
if (!die_nmi_called)
spin_lock_irqsave(&rom_lock, rom_pl); asminline_call(&cmn_regs, cru_rom_addr);
if (!die_nmi_called) die_nmi_called = 1;
asminline_call(&cmn_regs, cru_rom_addr); spin_unlock_irqrestore(&rom_lock, rom_pl);
die_nmi_called = 1; if (cmn_regs.u1.ral != 0) {
spin_unlock_irqrestore(&rom_lock, rom_pl); panic("An NMI occurred, please see the Integrated "
if (cmn_regs.u1.ral == 0) { "Management Log for details.\n");
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");
} }
return NOTIFY_STOP; die_nmi_called = 0;
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