lkml.org 
[lkml]   [2019]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 3/4] watchdog: hpwdt: Add more information into message
Date
Default NMI handling code prints the same into the kernel log.

Signed-off-by: Ivan Mironov <mironov.ivan@gmail.com>
---
drivers/watchdog/hpwdt.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index e2958df46c69..95d002b5b120 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -155,19 +155,20 @@ static int hpwdt_my_nmi(void)
static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs)
{
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 (!mynmi)
return NMI_DONE;

- hex_byte_pack(panic_msg, mynmi);
- nmi_panic(regs, panic_msg);
+ pr_emerg("%02x: An NMI occurred (reason %02x, CPU %d). 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\n",
+ mynmi, ulReason, smp_processor_id());
+
+ nmi_panic(regs, "hpwdt: NMI: Not continuing");

return NMI_HANDLED;
}
--
2.20.1
\
 
 \ /
  Last update: 2019-01-14 03:37    [W:0.090 / U:0.960 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site