Skip to content
Commit 73ff5e3e authored by James Morse's avatar James Morse
Browse files

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's avatarJames Morse <james.morse@arm.com>
parent 57b6d739
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment