]> git.baikalelectronics.ru Git - kernel.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)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 9 Dec 2021 11:41:22 +0000 (22:41 +1100)
commita3ffcdf006e1b7b24fb2f836b28578a40fb963a3
tree9cb8fe21a962e5d81c5db88cdf37bc484f62b34c
parentbc39248e492fd1ba28d232369fde120f1dfe38a9
powerpc: handle kdump appropriately with crash_kexec_post_notifiers option

Kdump can be triggered after panic_notifers since commit 44c9451763d39
("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 eb896d78544f ("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
arch/powerpc/kernel/smp.c