mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jerry Hoemann <jerry.hoemann@hpe.com>
To: wim@linux-watchdog.org, linux@roeck-us.net
Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
	rwright@hpe.com, maurice.a.saldivar@hpe.com,
	Jerry Hoemann <jerry.hoemann@hpe.com>
Subject: [PATCH 09/10] watchdog/hpwdt: condition early return of NMI handler on iLO5
Date: Tue,  6 Feb 2018 15:58:54 -0700	[thread overview]
Message-ID: <20180206225855.30582-10-jerry.hoemann@hpe.com> (raw)
In-Reply-To: <20180206225855.30582-1-jerry.hoemann@hpe.com>

Modify prior change to not claim an NMI unless originated
from iLO to apply only to iLO5 and later going forward.
This restores hpwdt traditional behavior of calling panic
if the NMI is NMI_IO_CHECK, NMI_SERR, or NMI_UNKNOWN for
legacy hardware.

Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
---
 drivers/watchdog/hpwdt.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index 1edbcb8f1537..9bfb668115f8 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -33,6 +33,7 @@
 static unsigned int soft_margin = DEFAULT_MARGIN;	/* in seconds */
 static bool nowayout = WATCHDOG_NOWAYOUT;
 static unsigned int allow_kdump = 1;
+static bool iLO5;
 #ifdef CONFIG_HPWDT_NMI_DECODING	/* { */
 static bool pretimeout = 1;
 #else
@@ -140,14 +141,14 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs)
 		"3. OA Forward Progress Log\n"
 		"4. iLO Event Log";
 
-	if ((ulReason == NMI_UNKNOWN) && !mynmi)
-		return NMI_DONE;
-
 	pr_debug("nmi: ulReason=%d, mynmi=0x%0x\n", ulReason, mynmi);
 
 	if (!pretimeout)
 		return NMI_DONE;
 
+	if (iLO5 && (ulReason == NMI_UNKNOWN) && !mynmi)
+		return NMI_DONE;
+
 	if (allow_kdump)
 		hpwdt_stop(&hpwdt_dev);
 
@@ -280,6 +281,9 @@ static int hpwdt_probe(struct pci_dev *dev, const struct pci_device_id *ent)
 			", timer margin: %d seconds (nowayout=%d).\n",
 			HPWDT_VERSION, hpwdt_dev.timeout, nowayout);
 
+	if (dev->subsystem_vendor == PCI_VENDOR_ID_HP_3PAR)
+		iLO5 = 1;
+
 	return 0;
 
 error_wd_register:
-- 
2.13.6

  parent reply	other threads:[~2018-02-06 23:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-06 22:58 [PATCH 00/10] watchdog/hpwdt: Update driver to use watchdog core Jerry Hoemann
2018-02-06 22:58 ` [PATCH 01/10] watchdog/hpwdt: Remove legacy NMI sourcing Jerry Hoemann
2018-02-11 17:52   ` [01/10] " Guenter Roeck
2018-02-11 17:56   ` Guenter Roeck
2018-02-06 22:58 ` [PATCH 02/10] watchdog/hpwdt: remove include files no longer needed Jerry Hoemann
2018-02-06 22:58 ` [PATCH 03/10] watchdog/hpwdt: Update nmi_panic message Jerry Hoemann
2018-02-06 22:58 ` [PATCH 04/10] watchdog/hpwdt: white space changes Jerry Hoemann
2018-02-06 22:58 ` [PATCH 05/10] watchdog/hpwdt: Update Module info Jerry Hoemann
2018-02-06 22:58 ` [PATCH 06/10] watchdog/hpwdt: Modify to use watchdog core Jerry Hoemann
2018-02-06 22:58 ` [PATCH 07/10] watchdog/hpwdt: Select WATCHDOG_CORE Jerry Hoemann
2018-02-06 22:58 ` [PATCH 08/10] watchdog/hpwdt: Programable Pretimeout NMI Jerry Hoemann
2018-02-06 22:58 ` Jerry Hoemann [this message]
2018-02-06 22:58 ` [PATCH 10/10] watchdog/hpwdt: remove allow_kdump module parameter Jerry Hoemann

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=20180206225855.30582-10-jerry.hoemann@hpe.com \
    --to=jerry.hoemann@hpe.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=maurice.a.saldivar@hpe.com \
    --cc=rwright@hpe.com \
    --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

all inboxes | Powered by JetHome®