]> Git Repo - linux.git/commit - kernel/kexec.c
kexec: use common function for kimage_normal_alloc() and kimage_crash_alloc()
authorVivek Goyal <[email protected]>
Fri, 8 Aug 2014 21:25:48 +0000 (14:25 -0700)
committerLinus Torvalds <[email protected]>
Fri, 8 Aug 2014 22:57:32 +0000 (15:57 -0700)
commit255aedd90e3e804fb52e1a71636a3b22cf12f81b
tree5b25989bec463c43a82d159c8b285fdbbb57eb03
parentdabe78628dd886c4b71971d1d78f1cecc674b760
kexec: use common function for kimage_normal_alloc() and kimage_crash_alloc()

kimage_normal_alloc() and kimage_crash_alloc() are doing lot of similar
things and differ only little.  So instead of having two separate
functions create a common function kimage_alloc_init() and pass it the
"flags" argument which tells whether it is normal kexec or kexec_on_panic.
 And this function should be able to deal with both the cases.

This consolidation also helps later where we can use a common function
kimage_file_alloc_init() to handle normal and crash cases for new file
based kexec syscall.

Signed-off-by: Vivek Goyal <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Michael Kerrisk <[email protected]>
Cc: Yinghai Lu <[email protected]>
Cc: Eric Biederman <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Matthew Garrett <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Dave Young <[email protected]>
Cc: WANG Chao <[email protected]>
Cc: Baoquan He <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/kexec.c
This page took 0.055607 seconds and 4 git commands to generate.