diff options
Diffstat (limited to 'arch/ia64/kernel/setup.c')
-rw-r--r-- | arch/ia64/kernel/setup.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index d10404a41756..14e1200376a9 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -43,6 +43,8 @@ | |||
43 | #include <linux/initrd.h> | 43 | #include <linux/initrd.h> |
44 | #include <linux/pm.h> | 44 | #include <linux/pm.h> |
45 | #include <linux/cpufreq.h> | 45 | #include <linux/cpufreq.h> |
46 | #include <linux/kexec.h> | ||
47 | #include <linux/crash_dump.h> | ||
46 | 48 | ||
47 | #include <asm/ia32.h> | 49 | #include <asm/ia32.h> |
48 | #include <asm/machvec.h> | 50 | #include <asm/machvec.h> |
@@ -252,6 +254,41 @@ reserve_memory (void) | |||
252 | efi_memmap_init(&rsvd_region[n].start, &rsvd_region[n].end); | 254 | efi_memmap_init(&rsvd_region[n].start, &rsvd_region[n].end); |
253 | n++; | 255 | n++; |
254 | 256 | ||
257 | #ifdef CONFIG_KEXEC | ||
258 | /* crashkernel=size@offset specifies the size to reserve for a crash | ||
259 | * kernel.(offset is ingored for keep compatibility with other archs) | ||
260 | * By reserving this memory we guarantee that linux never set's it | ||
261 | * up as a DMA target.Useful for holding code to do something | ||
262 | * appropriate after a kernel panic. | ||
263 | */ | ||
264 | { | ||
265 | char *from = strstr(saved_command_line, "crashkernel="); | ||
266 | unsigned long base, size; | ||
267 | if (from) { | ||
268 | size = memparse(from + 12, &from); | ||
269 | if (size) { | ||
270 | sort_regions(rsvd_region, n); | ||
271 | base = kdump_find_rsvd_region(size, | ||
272 | rsvd_region, n); | ||
273 | if (base != ~0UL) { | ||
274 | rsvd_region[n].start = | ||
275 | (unsigned long)__va(base); | ||
276 | rsvd_region[n].end = | ||
277 | (unsigned long)__va(base + size); | ||
278 | n++; | ||
279 | crashk_res.start = base; | ||
280 | crashk_res.end = base + size - 1; | ||
281 | } | ||
282 | } | ||
283 | } | ||
284 | efi_memmap_res.start = ia64_boot_param->efi_memmap; | ||
285 | efi_memmap_res.end = efi_memmap_res.start + | ||
286 | ia64_boot_param->efi_memmap_size; | ||
287 | boot_param_res.start = __pa(ia64_boot_param); | ||
288 | boot_param_res.end = boot_param_res.start + | ||
289 | sizeof(*ia64_boot_param); | ||
290 | } | ||
291 | #endif | ||
255 | /* end of memory marker */ | 292 | /* end of memory marker */ |
256 | rsvd_region[n].start = ~0UL; | 293 | rsvd_region[n].start = ~0UL; |
257 | rsvd_region[n].end = ~0UL; | 294 | rsvd_region[n].end = ~0UL; |
@@ -263,6 +300,7 @@ reserve_memory (void) | |||
263 | sort_regions(rsvd_region, num_rsvd_regions); | 300 | sort_regions(rsvd_region, num_rsvd_regions); |
264 | } | 301 | } |
265 | 302 | ||
303 | |||
266 | /** | 304 | /** |
267 | * find_initrd - get initrd parameters from the boot parameter structure | 305 | * find_initrd - get initrd parameters from the boot parameter structure |
268 | * | 306 | * |