diff options
author | Mel Gorman <mel@csn.ul.ie> | 2007-07-17 07:03:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 13:22:59 -0400 |
commit | ed7ed365172e27b0efe9d43cc962723c7193e34e (patch) | |
tree | 6c22daf6908f92c64aae2b425e6383fe0ed404ac /mm/page_alloc.c | |
parent | 396faf0303d273219db5d7eb4a2879ad977ed185 (diff) |
handle kernelcore=: generic
This patch adds the kernelcore= parameter for x86.
Once all patches are applied, a new command-line parameter exist and a new
sysctl. This patch adds the necessary documentation.
From: Yasunori Goto <y-goto@jp.fujitsu.com>
When "kernelcore" boot option is specified, kernel can't boot up on ia64
because of an infinite loop. In addition, the parsing code can be handled
in an architecture-independent manner.
This patch uses common code to handle the kernelcore= parameter. It is
only available to architectures that support arch-independent zone-sizing
(i.e. define CONFIG_ARCH_POPULATES_NODE_MAP). Other architectures will
ignore the boot parameter.
[bunk@stusta.de: make cmdline_parse_kernelcore() static]
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Acked-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index c3f6f851f76e..0a53728a12f5 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -3416,7 +3416,7 @@ void __init free_area_init_nodes(unsigned long *max_zone_pfn) | |||
3416 | * kernelcore=size sets the amount of memory for use for allocations that | 3416 | * kernelcore=size sets the amount of memory for use for allocations that |
3417 | * cannot be reclaimed or migrated. | 3417 | * cannot be reclaimed or migrated. |
3418 | */ | 3418 | */ |
3419 | int __init cmdline_parse_kernelcore(char *p) | 3419 | static int __init cmdline_parse_kernelcore(char *p) |
3420 | { | 3420 | { |
3421 | unsigned long long coremem; | 3421 | unsigned long long coremem; |
3422 | if (!p) | 3422 | if (!p) |
@@ -3430,6 +3430,9 @@ int __init cmdline_parse_kernelcore(char *p) | |||
3430 | 3430 | ||
3431 | return 0; | 3431 | return 0; |
3432 | } | 3432 | } |
3433 | |||
3434 | early_param("kernelcore", cmdline_parse_kernelcore); | ||
3435 | |||
3433 | #endif /* CONFIG_ARCH_POPULATES_NODE_MAP */ | 3436 | #endif /* CONFIG_ARCH_POPULATES_NODE_MAP */ |
3434 | 3437 | ||
3435 | /** | 3438 | /** |