summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/kexec_image.c
diff options
context:
space:
mode:
authorBhupesh Sharma <bhsharma@redhat.com>2019-07-11 17:27:32 +0530
committerWill Deacon <will@kernel.org>2019-08-05 11:06:33 +0100
commitc19d050f80881296aab3ba90fe5b2c107a238dcb (patch)
treebdc7bfdb57c2870881b9d959300d078831f836c5 /arch/arm64/kernel/kexec_image.c
parentb907b80d7ae7b2b65ef9f534f3e9a32ce6a4b539 (diff)
arm64/kexec: Use consistent convention of initializing 'kxec_buf.mem' with KEXEC_BUF_MEM_UNKNOWN
With commit b6664ba42f14 ("s390, kexec_file: drop arch_kexec_mem_walk()"), we introduced the KEXEC_BUF_MEM_UNKNOWN macro. If kexec_buf.mem is set to this value, kexec_locate_mem_hole() will try to allocate free memory. While other arch(s) like s390 and x86_64 already use this macro to initialize kexec_buf.mem with, arm64 uses an equivalent value of 0. Replace it with KEXEC_BUF_MEM_UNKNOWN, to keep the convention of initializing 'kxec_buf.mem' consistent across various archs. Cc: takahiro.akashi@linaro.org Cc: james.morse@arm.com Reviewed-by: Matthias Brugger <mbrugger@suse.com> Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com> Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kernel/kexec_image.c')
-rw-r--r--arch/arm64/kernel/kexec_image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/kexec_image.c b/arch/arm64/kernel/kexec_image.c
index 2514fd6f12cb..29a9428486a5 100644
--- a/arch/arm64/kernel/kexec_image.c
+++ b/arch/arm64/kernel/kexec_image.c
@@ -84,7 +84,7 @@ static void *image_load(struct kimage *image,
kbuf.buffer = kernel;
kbuf.bufsz = kernel_len;
- kbuf.mem = 0;
+ kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;
kbuf.memsz = le64_to_cpu(h->image_size);
text_offset = le64_to_cpu(h->text_offset);
kbuf.buf_align = MIN_KIMG_ALIGN;