diff options
author | Philipp Rudo <prudo@linux.vnet.ibm.com> | 2017-09-05 11:55:23 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2018-04-16 09:10:22 +0200 |
commit | ee337f5469fd67f22d231e520ec4189ce0589d92 (patch) | |
tree | 7b2d0e72573aaca14b54520ffa2c59fbcfaac81a /arch/s390/kernel/kexec_image.c | |
parent | e49bb0a27fa3c6ec45cc13e2102a6ec13c4ae697 (diff) |
s390/kexec_file: Add crash support to image loader
Add support to load a crash kernel to the image loader. This requires
extending the purgatory.
Signed-off-by: Philipp Rudo <prudo@linux.vnet.ibm.com>
Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/kexec_image.c')
-rw-r--r-- | arch/s390/kernel/kexec_image.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/s390/kernel/kexec_image.c b/arch/s390/kernel/kexec_image.c index 7f5021e6c242..3800852595e8 100644 --- a/arch/s390/kernel/kexec_image.c +++ b/arch/s390/kernel/kexec_image.c @@ -25,6 +25,8 @@ static int kexec_file_add_image_kernel(struct kimage *image, buf.bufsz = kernel_len - STARTUP_NORMAL_OFFSET; buf.mem = STARTUP_NORMAL_OFFSET; + if (image->type == KEXEC_TYPE_CRASH) + buf.mem += crashk_res.start; buf.memsz = buf.bufsz; ret = kexec_add_buffer(&buf); @@ -43,10 +45,6 @@ static void *s390_image_load(struct kimage *image, struct s390_load_data data = {0}; int ret; - /* We don't support crash kernels yet. */ - if (image->type == KEXEC_TYPE_CRASH) - return ERR_PTR(-ENOTSUPP); - ret = kexec_file_add_image_kernel(image, &data, kernel, kernel_len); if (ret) return ERR_PTR(ret); |