From: Ivan Mironov <mironov.ivan@gmail.com>
To: linux-watchdog@vger.kernel.org, mironov.ivan@gmail.com
Cc: linux-kernel@vger.kernel.org,
Jerry Hoemann <jerry.hoemann@hpe.com>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
Guenter Roeck <linux@roeck-us.net>
Subject: [RFC PATCH 2/4] watchdog: hpwdt: Don't panic on foreign NMI
Date: Mon, 14 Jan 2019 07:36:15 +0500 [thread overview]
Message-ID: <20190114023617.10656-3-mironov.ivan@gmail.com> (raw)
In-Reply-To: <20190114023617.10656-1-mironov.ivan@gmail.com>
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@gmail.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
next prev parent reply other threads:[~2019-01-14 2:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-14 2:36 [RFC PATCH 0/4] watchdog: hpwdt: Fix NMI-related behaviour when CONFIG_HPWDT_NMI_DECODING is enabled Ivan Mironov
2019-01-14 2:36 ` [RFC PATCH 1/4] watchdog: hpwdt: Don't disable watchdog on NMI Ivan Mironov
2019-01-16 2:27 ` Jerry Hoemann
2019-01-16 2:52 ` Guenter Roeck
2019-02-02 4:55 ` Ivan Mironov
2019-02-08 1:26 ` Jerry Hoemann
2019-02-08 4:17 ` Guenter Roeck
2019-02-14 19:49 ` Ivan Mironov
2019-01-14 2:36 ` Ivan Mironov [this message]
2019-01-14 2:36 ` [RFC PATCH 3/4] watchdog: hpwdt: Add more information into message Ivan Mironov
2019-01-14 2:36 ` [RFC PATCH 4/4] watchdog: hpwdt: Make panic behaviour configurable Ivan Mironov
2019-01-16 2:30 ` Jerry Hoemann
2019-02-02 5:13 ` Ivan Mironov
2019-01-16 2:22 ` [RFC PATCH 0/4] watchdog: hpwdt: Fix NMI-related behaviour when CONFIG_HPWDT_NMI_DECODING is enabled Jerry Hoemann
2019-02-02 6:24 ` Ivan Mironov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190114023617.10656-3-mironov.ivan@gmail.com \
--to=mironov.ivan@gmail.com \
--cc=jerry.hoemann@hpe.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=wim@linux-watchdog.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).