aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2014-08-08 17:26:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 18:57:33 -0400
commit27f48d3e633be23656a097baa3be336e04a82d84 (patch)
tree8933767497b417ee532f63b9582734743eed8e41 /kernel
parent12db5562e0352986a265841638482b84f3a6899b (diff)
kexec-bzImage64: support for loading bzImage using 64bit entry
This is loader specific code which can load bzImage and set it up for 64bit entry. This does not take care of 32bit entry or real mode entry. 32bit mode entry can be implemented if somebody needs it. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Cc: Borislav Petkov <bp@suse.de> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Eric Biederman <ebiederm@xmission.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Matthew Garrett <mjg59@srcf.ucam.org> Cc: Greg Kroah-Hartman <greg@kroah.com> Cc: Dave Young <dyoung@redhat.com> Cc: WANG Chao <chaowang@redhat.com> Cc: Baoquan He <bhe@redhat.com> Cc: Andy Lutomirski <luto@amacapital.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kexec.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c
index 669e331aa9ec..0926f2a3ed03 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -460,6 +460,14 @@ static void kimage_file_post_load_cleanup(struct kimage *image)
460 460
461 /* See if architecture has anything to cleanup post load */ 461 /* See if architecture has anything to cleanup post load */
462 arch_kimage_file_post_load_cleanup(image); 462 arch_kimage_file_post_load_cleanup(image);
463
464 /*
465 * Above call should have called into bootloader to free up
466 * any data stored in kimage->image_loader_data. It should
467 * be ok now to free it up.
468 */
469 kfree(image->image_loader_data);
470 image->image_loader_data = NULL;
463} 471}
464 472
465/* 473/*
@@ -576,7 +584,6 @@ out_free_control_pages:
576 kimage_free_page_list(&image->control_pages); 584 kimage_free_page_list(&image->control_pages);
577out_free_post_load_bufs: 585out_free_post_load_bufs:
578 kimage_file_post_load_cleanup(image); 586 kimage_file_post_load_cleanup(image);
579 kfree(image->image_loader_data);
580out_free_image: 587out_free_image:
581 kfree(image); 588 kfree(image);
582 return ret; 589 return ret;
@@ -900,8 +907,6 @@ static void kimage_free(struct kimage *image)
900 /* Free the kexec control pages... */ 907 /* Free the kexec control pages... */
901 kimage_free_page_list(&image->control_pages); 908 kimage_free_page_list(&image->control_pages);
902 909
903 kfree(image->image_loader_data);
904
905 /* 910 /*
906 * Free up any temporary buffers allocated. This might hit if 911 * Free up any temporary buffers allocated. This might hit if
907 * error occurred much later after buffer allocation. 912 * error occurred much later after buffer allocation.