]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc: handle kdump appropriately with crash_kexec_post_notifiers option
authorHari Bathini <hbathini@linux.ibm.com>
Tue, 7 Dec 2021 10:37:18 +0000 (16:07 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 08:19:48 +0000 (09:19 +0100)
commit2a8870f5cb2ab56fdf17ef219d9389061ca9a774
tree1dc46b7b1a90ab145daae9c2627c8fc46fd73c55
parent2dbb618e241a7d5213b0c63abfbbef108854e8c0
powerpc: handle kdump appropriately with crash_kexec_post_notifiers option

[ Upstream commit 219572d2fc4135b5ce65c735d881787d48b10e71 ]

Kdump can be triggered after panic_notifers since commit f06e5153f4ae2
("kernel/panic.c: add "crash_kexec_post_notifiers" option for kdump
after panic_notifers") introduced crash_kexec_post_notifiers option.
But using this option would mean smp_send_stop(), that marks all other
CPUs as offline, gets called before kdump is triggered. As a result,
kdump routines fail to save other CPUs' registers. To fix this, kdump
friendly crash_smp_send_stop() function was introduced with kernel
commit 0ee59413c967 ("x86/panic: replace smp_send_stop() with kdump
friendly version in panic path"). Override this kdump friendly weak
function to handle crash_kexec_post_notifiers option appropriately
on powerpc.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
[Fixed signature of crash_stop_this_cpu() - reported by lkp@intel.com]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211207103719.91117-1-hbathini@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/kernel/smp.c