From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794412529; b=ueRhpuM9zdH5MPbw71sILzOCenZ/M2xM81RDALDAPhmviIJSHeFpbJzqnMFBwT7cLrB3 SyZBlP6bLy7/s+oBlzIs3A3bNNUwxn/5fVDNPfm0fFoewh5bhKQ33mq1dMevbiOAVqvbx 68jXi9cyuLpLJEmHbSsAKLqJyCGAXekOY7wipIrBEofTUkV9rlhk5KCl+ixgGSY66cfyl XueSh9pLgygSt/a6DqG8/IlnPgaSm5OHG6sp4GE+b7f0U15Ff8WeMgv+GPIkqJui0r5/O B3gaBuhpuAZ+lI4yYyupwXuvI4RxszC7N4/6cIMUlgwI15SelZnkIjXie+fzta9NT3A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794412529; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=hzBceqh/KQBhXeCn5oMTRtvRyVQ5R1TjWoLMywUAQlM=; b=Ns/2QpdOWWClWfVUPlPVJMUoNtfaCQVqzDW2DvHZasC8l2yAlBwDqLETuBxExwdRcai/ R7pxprkvUBTG4Hz1NQGjHU5s1d6TXu/p+RpwwWE20/X5FZQ7CszSj2aOSy7pjE8nLca84 ZmTm+bHY/WPPhxvZN3vwpjrmVSUQ9XVipK9p3i01hEmeWDjyx9HdAATQdWeyc135j40YC 7QbJsUH6bVvG8g2a9ITcjV2gyUTpyF4xwsMzLkQBVdM7iTtbDQcsivVfKIr/m6AahdTkA yCRx3ChsH/N6ncQnVgbPoaytGFt9oxc+5pvgy+qzNejav0ebxNppx2qxHf+hJqOCzjg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WIbcr3lb; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22E0A606A32E for ; Wed, 11 Nov 2026 15:55:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WIbcr3lb Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5849C1F00A05; Wed, 11 Nov 2026 15:55:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794412528; bh=hzBceqh/KQBhXeCn5oMTRtvRyVQ5R1TjWoLMywUAQlM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WIbcr3lbiTrfvEfTCrTizO4uXrptQYww/YXk57xaJHPe8Sqj/dcZKs+pxGodhElCK vF18cEzWfa4F8u4kRyAN98zyiAfuYnCFWNyQb95EbQO5KRnM9VEKy8XcBySFkXoVef tW5JU1FaqQTck3UiwxvbxpPk/3NiFvCKsdS82PNWP5gooBWrw+Mudsml917z3JcWcY fmvqvQPpjDS5kIJl0cUHEWm7nrNaXPqKe9GMvkqb8q+A6gF3lA1MAPpvjIwPC3f7wa kdx24GQdRA2WOgWbqLgrsXd+hUKInU+o7qk2eQhD1V9c+z09r2yxDTvOq9f/BVlO71 n/OB/ZxgKHhhQ== From: Sasha Levin To: stable@vger.kernel.org Cc: Steve Wahl , Guenter Roeck , Sasha Levin Subject: [PATCH 6.12.y 3/4] watchdog/hpwdt: Refine hpwdt message for UV platform Date: Wed, 11 Nov 2026 10:55:24 -0500 Message-ID: <20261111155515.2677444-3-sashal@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261111155515.2677444-1-sashal@kernel.org> References: <20261107052212-failed-6.12-ed9e4c1ff15d@kernel.org> <20261111155515.2677444-1-sashal@kernel.org> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Steve Wahl [ Upstream commit d8207d1e9a36b1a8a461581b2d4073ea28335603 ] The watchdog hardware the hpwdt driver uses was added to the UV platform for UV_5, but the logging mentioned by this driver was not added to the BIOS. When the watchdog fires, the printed message had the administrators and developers looking for non-existent log files, and confused about whether a watchdog actually tripped. Change the message that prints on UV platforms so it doesn't send the user looking for non-existent logs. To aid in any future debugging, include all 8 bits of the NMISTAT register in the output, not just the two bits being used to determine this was "mynmi". And provide names to the bits in NMISTAT so the code is easier to understand. Signed-off-by: Steve Wahl Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20260318155005.90271-1-steve.wahl@hpe.com Signed-off-by: Guenter Roeck Stable-dep-of: ed9e4c1ff15d ("panic: restore variable arguments to nmi_panic()") Signed-off-by: Sasha Levin --- drivers/watchdog/hpwdt.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index ae30e394d176e..ba08189937ec6 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c @@ -22,6 +22,7 @@ #include #ifdef CONFIG_HPWDT_NMI_DECODING #include +#include #endif #include @@ -158,24 +159,31 @@ static int hpwdt_set_pretimeout(struct watchdog_device *wdd, unsigned int req) return 0; } -static int hpwdt_my_nmi(void) -{ - return ioread8(hpwdt_nmistat) & 0x6; -} +#define NMISTAT_EASR BIT(0) +#define NMISTAT_EWDOG BIT(1) +#define NMISTAT_RTRAP BIT(2) +#define NMISTAT_DBELL BIT(3) +#define NMISTAT_EMSWDG BIT(4) +#define NMISTAT_GPI BIT(5) +#define NMISTAT_NMIOUT BIT(7) /* * NMI Handler */ static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs) { - unsigned int mynmi = hpwdt_my_nmi(); - static char panic_msg[] = + u8 nmistat = ioread8(hpwdt_nmistat); + bool mynmi = (nmistat & (NMISTAT_EWDOG | NMISTAT_RTRAP)) != 0; + static char panic_msg_default[] = "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"; + static char panic_msg_uv[] = + "00: A watchdog NMI occurred."; + char *panic_msg = is_uv_system() ? panic_msg_uv : panic_msg_default; if (ulReason == NMI_UNKNOWN && !mynmi) return NMI_DONE; @@ -189,7 +197,7 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs) hpwdt_ping_ticks(SECS_TO_TICKS(val)); } - hex_byte_pack(panic_msg, mynmi); + hex_byte_pack(panic_msg, nmistat); nmi_panic(regs, panic_msg); return NMI_HANDLED; -- 2.53.0