kexec: split kexec_file syscall code to kexec_file.c
Split kexec_file syscall related code to another file kernel/kexec_file.c so that the #ifdef CONFIG_KEXEC_FILE in kexec.c can be dropped. Sharing variables and functions are moved to kernel/kexec_internal.h per suggestion from Vivek and Petr. [akpm@linux-foundation.org: fix bisectability] [akpm@linux-foundation.org: declare the various arch_kexec functions] [akpm@linux-foundation.org: fix build] Signed-off-by: Dave Young <dyoung@redhat.com> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Petr Tesarik <ptesarik@suse.cz> Cc: Theodore Ts'o <tytso@mit.edu> Cc: Josh Boyer <jwboyer@fedoraproject.org> Cc: David Howells <dhowells@redhat.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
a202fbbf56
commit
a43cac0d9d
@@ -50,6 +50,7 @@ obj-$(CONFIG_MODULE_SIG) += module_signing.o
|
||||
obj-$(CONFIG_KALLSYMS) += kallsyms.o
|
||||
obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
|
||||
obj-$(CONFIG_KEXEC) += kexec.o
|
||||
obj-$(CONFIG_KEXEC_FILE) += kexec_file.o
|
||||
obj-$(CONFIG_BACKTRACE_SELF_TEST) += backtracetest.o
|
||||
obj-$(CONFIG_COMPAT) += compat.o
|
||||
obj-$(CONFIG_CGROUPS) += cgroup.o
|
||||
|
1056
kernel/kexec.c
1056
kernel/kexec.c
File diff suppressed because it is too large
Load Diff
1045
kernel/kexec_file.c
Normal file
1045
kernel/kexec_file.c
Normal file
File diff suppressed because it is too large
Load Diff
22
kernel/kexec_internal.h
Normal file
22
kernel/kexec_internal.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef LINUX_KEXEC_INTERNAL_H
|
||||
#define LINUX_KEXEC_INTERNAL_H
|
||||
|
||||
#include <linux/kexec.h>
|
||||
|
||||
struct kimage *do_kimage_alloc_init(void);
|
||||
int sanity_check_segment_list(struct kimage *image);
|
||||
void kimage_free_page_list(struct list_head *list);
|
||||
void kimage_free(struct kimage *image);
|
||||
int kimage_load_segment(struct kimage *image, struct kexec_segment *segment);
|
||||
void kimage_terminate(struct kimage *image);
|
||||
int kimage_is_destination_range(struct kimage *image,
|
||||
unsigned long start, unsigned long end);
|
||||
|
||||
extern struct mutex kexec_mutex;
|
||||
|
||||
#ifdef CONFIG_KEXEC_FILE
|
||||
void kimage_file_post_load_cleanup(struct kimage *image);
|
||||
#else /* CONFIG_KEXEC_FILE */
|
||||
static inline void kimage_file_post_load_cleanup(struct kimage *image) { }
|
||||
#endif /* CONFIG_KEXEC_FILE */
|
||||
#endif /* LINUX_KEXEC_INTERNAL_H */
|
Reference in New Issue
Block a user