[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190114023617.10656-3-mironov.ivan@gmail.com>
Date: Mon, 14 Jan 2019 07:36:15 +0500
From: Ivan Mironov <mironov.ivan@...il.com>
To: linux-watchdog@...r.kernel.org, mironov.ivan@...il.com
Cc: linux-kernel@...r.kernel.org,
Jerry Hoemann <jerry.hoemann@....com>,
Wim Van Sebroeck <wim@...ux-watchdog.org>,
Guenter Roeck <linux@...ck-us.net>
Subject: [RFC PATCH 2/4] watchdog: hpwdt: Don't panic on foreign NMI
Currently, hpwdt unconditionally panics on foreign NMIs in some cases.
This goes against the default kernel behaviour (which is configured by
unknown_nmi_panic and panic_on_unrecovered_nmi).
With this patch, hpwdt will simply ignore NMI unless one of "mynmi"
flags is set by iLO.
Signed-off-by: Ivan Mironov <mironov.ivan@...il.com>
---
drivers/watchdog/hpwdt.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index 2467e6bc25c2..e2958df46c69 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -33,7 +33,6 @@
#define DEFAULT_MARGIN 30
#define PRETIMEOUT_SEC 9
-static bool ilo5;
static unsigned int soft_margin = DEFAULT_MARGIN; /* in seconds */
static bool nowayout = WATCHDOG_NOWAYOUT;
static bool pretimeout = IS_ENABLED(CONFIG_HPWDT_NMI_DECODING);
@@ -164,10 +163,7 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs)
"3. OA Forward Progress Log\n"
"4. iLO Event Log";
- if (ilo5 && ulReason == NMI_UNKNOWN && !mynmi)
- return NMI_DONE;
-
- if (ilo5 && !pretimeout && !mynmi)
+ if (!mynmi)
return NMI_DONE;
hex_byte_pack(panic_msg, mynmi);
@@ -332,9 +328,6 @@ static int hpwdt_init_one(struct pci_dev *dev,
dev_info(&dev->dev, "pretimeout: %s.\n",
pretimeout ? "on" : "off");
- if (dev->subsystem_vendor == PCI_VENDOR_ID_HP_3PAR)
- ilo5 = true;
-
return 0;
error_wd_register:
--
2.20.1
Powered by blists - more mailing lists