OSDN Git Service

arm64: kexec_file: try more regions if loading segments fails
authorBenjamin Gwin <bgwin@google.com>
Tue, 3 Nov 2020 20:11:06 +0000 (12:11 -0800)
committerWill Deacon <will@kernel.org>
Thu, 5 Nov 2020 21:48:05 +0000 (21:48 +0000)
commit108aa503657ee2fe8aa071dc620d96372c252ecd
tree5c3b1dfde74956ffb25d66fd9066b9ca4c88b0e7
parent7ee31a3aa8f490c6507bc4294df6b70bed1c593e
arm64: kexec_file: try more regions if loading segments fails

It's possible that the first region picked for the new kernel will make
it impossible to fit the other segments in the required 32GB window,
especially if we have a very large initrd.

Instead of giving up, we can keep testing other regions for the kernel
until we find one that works.

Suggested-by: Ryan O'Leary <ryanoleary@google.com>
Signed-off-by: Benjamin Gwin <bgwin@google.com>
Link: https://lore.kernel.org/r/20201103201106.2397844-1-bgwin@google.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/kexec_image.c
arch/arm64/kernel/machine_kexec_file.c