Received: by 10.223.185.116 with SMTP id b49csp3089386wrg; Sun, 25 Feb 2018 13:37:04 -0800 (PST) X-Google-Smtp-Source: AH8x226YJkmUzgl4XI17Al5WHjp803v7aj9tL9Yc98fXunTFqwpjNXWUUwJ0Gi7q5ZCVrlla5tT9 X-Received: by 2002:a17:902:e81:: with SMTP id 1-v6mr8616437plx.169.1519594624270; Sun, 25 Feb 2018 13:37:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519594624; cv=none; d=google.com; s=arc-20160816; b=Um9Ml5nIbpJ5gSPzyCAOimykz2+ndWnIFZngGMl1iqkqfWn9UlyJfXzAMDXSpqyzrZ XEmWhf5HV8dIlgSTTsDEJB6wMDu8Rfv2Anv2+BHr8wtg3As8FW5bn8Mo06e9t3EiBxLc rIYxOxjgDpVx23SDtcKJwDuy0zIAOgR5duqnaRQWzAfkPQJctEp5eSYn+OEg0lqqyNTc uDosugB+AaXFu2rFsq6YR1WP+X5/xgSppiu8Uktan4LvCYO6ExfCkK6QAJDqYvFyjvBw D5uF7E4vkTYcgGMelLLbv4FJr3GmggoCKBlyoqmhpm3DVBbNzunc4WkJIy7vVr0U5xf4 tTMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=6hVHwGCZ7n0NV3VhYEQHwVJAGZONOx15xwrDPLLKxVg=; b=zrNLYE+ZdjbUorgC1it1YbbFdIs80KetcnptlkMcScwi7Ljs9K2bCBGBcArXAW7BoO KtpkaJRVqRoUVO2uSDllgCOx2x0xXBnwbnNpMwqnGNIczRqco806r5rU16LHx8AaNAn2 Eyud4qihXEpsW+/yIuRuY2VRKgRChDQPv9Bk1QT+I/NPd/basmXqI8Di7KwvqHDdW842 uaFUVaI2jmBP4Cxbx0wRFfm8QIgsP7CKgBXK/sudeFlVuc2joRQZDo9A94E7i5ZwbOuQ njjJSjFy6+CFDl1r3zZwn2fWDfiSI92VrhBT/KOJShx+zM11NhchB77T7n/aqvHqwE7K dVjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z188si4627918pgb.592.2018.02.25.13.36.50; Sun, 25 Feb 2018 13:37:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752142AbeBYVfX (ORCPT + 99 others); Sun, 25 Feb 2018 16:35:23 -0500 Received: from g4t3427.houston.hpe.com ([15.241.140.73]:21375 "EHLO g4t3427.houston.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751923AbeBYVdl (ORCPT ); Sun, 25 Feb 2018 16:33:41 -0500 Received: from g4t3433.houston.hpecorp.net (g4t3433.houston.hpecorp.net [16.208.49.245]) by g4t3427.houston.hpe.com (Postfix) with ESMTP id 6ADA26A; Sun, 25 Feb 2018 21:33:40 +0000 (UTC) Received: from anatevka.ftc.rdlabs.hpecorp.net (anatevka.americas.hpqcorp.net [10.34.81.6]) by g4t3433.houston.hpecorp.net (Postfix) with ESMTP id E530747; Sun, 25 Feb 2018 21:33:39 +0000 (UTC) From: Jerry Hoemann 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, mingo@kernel.org, marcus.folkesson@gmail.com, Jerry Hoemann Subject: [PATCH v4 03/10] watchdog/hpwdt: Update nmi_panic message. Date: Sun, 25 Feb 2018 14:32:52 -0700 Message-Id: <20180225213259.2861-4-jerry.hoemann@hpe.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180225213259.2861-1-jerry.hoemann@hpe.com> References: <20180225213259.2861-1-jerry.hoemann@hpe.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Include the nmistat in the nmi_panic message to give support an indication why the NMI was called (e.g. a timeout or generate nmi button.) Signed-off-by: Jerry Hoemann --- drivers/watchdog/hpwdt.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 8ea8e7466dd9..2a6f3be22c98 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c @@ -113,19 +113,23 @@ static int hpwdt_my_nmi(void) */ static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs) { - if ((ulReason == NMI_UNKNOWN) && !hpwdt_my_nmi()) + unsigned int mynmi = hpwdt_my_nmi(); + static char panic_msg[] = + "00: An NMI occurred. Depending on your system the reason " + "for the NMI is logged in any one of the following resources:\n" + "1. Integrated Management Log (IML)\n" + "2. OA Syslog\n" + "3. OA Forward Progress Log\n" + "4. iLO Event Log"; + + if ((ulReason == NMI_UNKNOWN) && mynmi) return NMI_DONE; if (allow_kdump) hpwdt_stop(); - nmi_panic(regs, "An NMI occurred. Depending on your system the reason " - "for the NMI is logged in any one of the following " - "resources:\n" - "1. Integrated Management Log (IML)\n" - "2. OA Syslog\n" - "3. OA Forward Progress Log\n" - "4. iLO Event Log"); + hex_byte_pack(panic_msg, mynmi); + nmi_panic(regs, panic_msg); return NMI_HANDLED; } -- 2.13.6