diff options
author | Huang Ying <ying.huang@intel.com> | 2008-10-30 21:48:08 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-31 05:01:56 -0400 |
commit | 92be3d6bdf2cb34972ab50e12ad4da1076e690da (patch) | |
tree | 6ed10cb8a14615ca0bda48f64520c82480397d00 /arch/x86/include/asm/kexec.h | |
parent | 31498a01496ffca3b542bae72b8ec499cd9302db (diff) |
kexec/i386: allocate page table pages dynamically
Impact: save .text size when kexec is built in but not loaded
This patch adds an architecture specific struct kimage_arch into
struct kimage. The pointers to page table pages used by kexec are
added to struct kimage_arch. The page tables pages are dynamically
allocated in machine_kexec_prepare instead of statically from BSS
segment. This will save up to 20k memory when kexec image is not
loaded.
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/kexec.h')
-rw-r--r-- | arch/x86/include/asm/kexec.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h index a1f22771a15a..df9c41a9c6ae 100644 --- a/arch/x86/include/asm/kexec.h +++ b/arch/x86/include/asm/kexec.h | |||
@@ -170,6 +170,20 @@ relocate_kernel(unsigned long indirection_page, | |||
170 | unsigned long start_address) ATTRIB_NORET; | 170 | unsigned long start_address) ATTRIB_NORET; |
171 | #endif | 171 | #endif |
172 | 172 | ||
173 | #ifdef CONFIG_X86_32 | ||
174 | #define ARCH_HAS_KIMAGE_ARCH | ||
175 | |||
176 | struct kimage_arch { | ||
177 | pgd_t *pgd; | ||
178 | #ifdef CONFIG_X86_PAE | ||
179 | pmd_t *pmd0; | ||
180 | pmd_t *pmd1; | ||
181 | #endif | ||
182 | pte_t *pte0; | ||
183 | pte_t *pte1; | ||
184 | }; | ||
185 | #endif | ||
186 | |||
173 | #endif /* __ASSEMBLY__ */ | 187 | #endif /* __ASSEMBLY__ */ |
174 | 188 | ||
175 | #endif /* _ASM_X86_KEXEC_H */ | 189 | #endif /* _ASM_X86_KEXEC_H */ |