Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360095
b: refs/heads/master
c: 4893fc8
h: refs/heads/master
i:
  360093: 5c2d427
  360091: 3cc282d
  360087: 429f276
  360079: 980930f
  360063: 1933d5d
v: v3
  • Loading branch information
Corey Minyard authored and John Crispin committed Feb 19, 2013
1 parent 1c3116c commit b490f98
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d3ff9338023236f39332b07b3afed76c490a5041
refs/heads/master: 4893fc8856a81d2037c1c976cb320be6f00e84a0
39 changes: 39 additions & 0 deletions trunk/arch/mips/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,37 @@ static int __init early_parse_mem(char *p)
}
early_param("mem", early_parse_mem);

#ifdef CONFIG_PROC_VMCORE
unsigned long setup_elfcorehdr, setup_elfcorehdr_size;
static int __init early_parse_elfcorehdr(char *p)
{
int i;

setup_elfcorehdr = memparse(p, &p);

for (i = 0; i < boot_mem_map.nr_map; i++) {
unsigned long start = boot_mem_map.map[i].addr;
unsigned long end = (boot_mem_map.map[i].addr +
boot_mem_map.map[i].size);
if (setup_elfcorehdr >= start && setup_elfcorehdr < end) {
/*
* Reserve from the elf core header to the end of
* the memory segment, that should all be kdump
* reserved memory.
*/
setup_elfcorehdr_size = end - setup_elfcorehdr;
break;
}
}
/*
* If we don't find it in the memory map, then we shouldn't
* have to worry about it, as the new kernel won't use it.
*/
return 0;
}
early_param("elfcorehdr", early_parse_elfcorehdr);
#endif

static void __init arch_mem_addpart(phys_t mem, phys_t end, int type)
{
phys_t size;
Expand Down Expand Up @@ -547,6 +578,14 @@ static void __init arch_mem_init(char **cmdline_p)
}

bootmem_init();
#ifdef CONFIG_PROC_VMCORE
if (setup_elfcorehdr && setup_elfcorehdr_size) {
printk(KERN_INFO "kdump reserved memory at %lx-%lx\n",
setup_elfcorehdr, setup_elfcorehdr_size);
reserve_bootmem(setup_elfcorehdr, setup_elfcorehdr_size,
BOOTMEM_DEFAULT);
}
#endif
#ifdef CONFIG_KEXEC
if (crashk_res.start != crashk_res.end)
reserve_bootmem(crashk_res.start,
Expand Down

0 comments on commit b490f98

Please sign in to comment.