kexec: Allow kexec to use the crashdump region when its not in use
The regular kexec image is copied from user-space memory and
scattered through kernel memory. When it comes time to execute
the image, it has to be re-assembled in memory. This takes a
little time.
If the crashdump region is specified, this relocation still
happens, but isn't necessary if nothing is loaded in the
crashkernel region.
Allow regular kexec to make use of the crashdump region if
the kdump kernel is not loaded. There can only be one user
at a time. A new flag indicates kexec is using the region,
which prevents a new kdump kernel from being lodaded.
This allows a relocateable kernel to be executed in place without
the need to relocate it if no kdump kernel was loaded, or it can
be unloaded prior to kexec. As both kernel_kexec() and __crash_kexec()
take the mutex, kdump can't be triggered if kexec calls panic().
Signed-off-by:
James Morse <james.morse@arm.com>
Loading
Please register or sign in to comment