]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hpwdt: use nmi_panic() when kernel panics in NMI handler
authorHidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Tue, 22 Mar 2016 21:27:24 +0000 (14:27 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 27 Feb 2017 19:26:42 +0000 (11:26 -0800)
commita05f2d83bb8ff04091168fc2271c8911ff8ec2af
treea254b365f0ad6e4612d1007b380742994b25b1b0
parent5892095b41d30ecef018201bf3556b76e6a5314b
hpwdt: use nmi_panic() when kernel panics in NMI handler

Orabug: 25505543

Commit 1717f2096b54 ("panic, x86: Fix re-entrance problem due to panic
on NMI") introduced nmi_panic() which prevents concurrent and recursive
execution of panic().  It also saves registers for the crash dump on x86
by later commit 58c5661f2144 ("panic, x86: Allow CPUs to save registers
even if looping in NMI context").

hpwdt driver can call panic() from NMI handler, so replace it with
nmi_panic().  Also, do some cleanups.

Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Cc: Thomas Mingarelli <thomas.mingarelli@hpe.com>
Cc: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit abc514c58059ca6f02df41798e828ffd864f1d21)
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
drivers/watchdog/hpwdt.c