]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/fadump: register for fadump as early as possible
authorHari Bathini <hbathini@linux.ibm.com>
Tue, 1 Feb 2022 10:53:05 +0000 (16:23 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 1 Mar 2022 12:41:00 +0000 (23:41 +1100)
commitad55c02b2a46e6ee4ca484709d0813f9fd29413d
tree489d9d79a02a728379b56283844d0dfbdcd0c139
parentb9a6be06a1474d629ae838fc0fea36a78bf08b35
powerpc/fadump: register for fadump as early as possible

Crash recovery (fadump) is setup in the userspace by some service. This
service rebuilds initrd with dump capture capability, if it is not
already dump capture capable before proceeding to register for firmware
assisted dump (echo 1 > /sys/kernel/fadump/registered). But arming the
kernel with crash recovery support does not have to wait for userspace
configuration. So, register for fadump while setting it up itself. This
can at worst lead to a scenario, where /proc/vmcore is ready afer crash
but the initrd does not know how/where to offload it, which is always
better than not having a /proc/vmcore at all due to incomplete
configuration in the userspace at the time of crash.

Commit c5e5109a3bc6 ("powerpc/fadump: re-register firmware-assisted dump
if already registered") ensures this change does not break userspace.

Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
[mpe: Reword comment]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220201105305.155511-1-hbathini@linux.ibm.com
arch/powerpc/kernel/fadump.c