]> 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)
commit31f86bd557533c4382e71012a445254d752ffe50
tree9cb8fe21a962e5d81c5db88cdf37bc484f62b34c
parent1c56848879d6ab8dfbb1e60571205e36b9110816
powerpc: handle kdump appropriately with crash_kexec_post_notifiers option

Kdump can be triggered after panic_notifers since commit 5ad7898a83bdd
("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 8e79a96b64be ("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