Skip to content

Commit

Permalink
x86, mm: Let "memmap=" take more entries one time
Browse files Browse the repository at this point in the history
Current "memmap=" only can take one entry every time.
when we have more entries, we have to use memmap= for each of them.

For pxe booting, we have command line length limitation, those extra
"memmap=" would waste too much space.

This patch make memmap= could take several entries one time,
and those entries will be split with ','

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/1353123563-3103-47-git-send-email-yinghai@kernel.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
  • Loading branch information
Yinghai Lu authored and H. Peter Anvin committed Nov 17, 2012
1 parent 600cc5b commit 9710f58
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion arch/x86/kernel/e820.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ static int __init parse_memopt(char *p)
}
early_param("mem", parse_memopt);

static int __init parse_memmap_opt(char *p)
static int __init parse_memmap_one(char *p)
{
char *oldp;
u64 start_at, mem_size;
Expand Down Expand Up @@ -877,6 +877,20 @@ static int __init parse_memmap_opt(char *p)

return *p == '\0' ? 0 : -EINVAL;
}
static int __init parse_memmap_opt(char *str)
{
while (str) {
char *k = strchr(str, ',');

if (k)
*k++ = 0;

parse_memmap_one(str);
str = k;
}

return 0;
}
early_param("memmap", parse_memmap_opt);

void __init finish_e820_parsing(void)
Expand Down

0 comments on commit 9710f58

Please sign in to comment.