aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/setup_64.c
diff options
context:
space:
mode:
authorBernhard Walle <bwalle@suse.de>2008-06-20 09:38:22 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 06:45:44 -0400
commit1ecd27657b735128a728ebf0c31fce5e1456718a (patch)
treef49fba5bd4a7a640b738a0f225ff3304ab9af877 /arch/x86/kernel/setup_64.c
parent6236af82d8a989e150a02800c210eb61cb1e17be (diff)
x86: unify crashkernel reservation for 32 and 64 bit
This patch moves the reserve_crashkernel() to setup.c and removes the architecture-specific version. Both versions were more or less the same. I tested it on both x86-64 and i386, with CONFIG_KEXEC on and off (so that it compiles). Signed-off-by: Bernhard Walle <bwalle@suse.de> Cc: yhlu.kernel@gmail.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/setup_64.c')
-rw-r--r--arch/x86/kernel/setup_64.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c
index 16ef53ab538a..504caeaffd58 100644
--- a/arch/x86/kernel/setup_64.c
+++ b/arch/x86/kernel/setup_64.c
@@ -228,46 +228,6 @@ static inline void copy_edd(void)
228} 228}
229#endif 229#endif
230 230
231#ifdef CONFIG_KEXEC
232static void __init reserve_crashkernel(void)
233{
234 unsigned long long total_mem;
235 unsigned long long crash_size, crash_base;
236 int ret;
237
238 total_mem = ((unsigned long long)max_low_pfn - min_low_pfn) << PAGE_SHIFT;
239
240 ret = parse_crashkernel(boot_command_line, total_mem,
241 &crash_size, &crash_base);
242 if (ret == 0 && crash_size) {
243 if (crash_base <= 0) {
244 printk(KERN_INFO "crashkernel reservation failed - "
245 "you have to specify a base address\n");
246 return;
247 }
248
249 if (reserve_bootmem_generic(crash_base, crash_size,
250 BOOTMEM_EXCLUSIVE) < 0) {
251 printk(KERN_INFO "crashkernel reservation failed - "
252 "memory is in use\n");
253 return;
254 }
255
256 printk(KERN_INFO "Reserving %ldMB of memory at %ldMB "
257 "for crashkernel (System RAM: %ldMB)\n",
258 (unsigned long)(crash_size >> 20),
259 (unsigned long)(crash_base >> 20),
260 (unsigned long)(total_mem >> 20));
261 crashk_res.start = crash_base;
262 crashk_res.end = crash_base + crash_size - 1;
263 insert_resource(&iomem_resource, &crashk_res);
264 }
265}
266#else
267static inline void __init reserve_crashkernel(void)
268{}
269#endif
270
271/* 231/*
272 * setup_arch - architecture-specific boot-time initializations 232 * setup_arch - architecture-specific boot-time initializations
273 * 233 *