The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH]Fix parsing kernelcore boot option for ia64
@ 2007-04-13  5:26 Yasunori Goto
  2007-04-16 13:29 ` Mel Gorman
  2007-04-22  6:22 ` Andrew Morton
  0 siblings, 2 replies; 13+ messages in thread
From: Yasunori Goto @ 2007-04-13  5:26 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Mel Gorman, Linux Kernel ML

Hello.

cmdline_parse_kernelcore() should return the next pointer of boot option
like memparse() doing. If not, it is cause of eternal loop on ia64 box.
This patch is for 2.6.21-rc6-mm1.

Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>

----

 arch/ia64/kernel/efi.c |    2 +-
 include/linux/mm.h     |    2 +-
 mm/page_alloc.c        |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

Index: current_test/arch/ia64/kernel/efi.c
===================================================================
--- current_test.orig/arch/ia64/kernel/efi.c	2007-04-12 17:33:28.000000000 +0900
+++ current_test/arch/ia64/kernel/efi.c	2007-04-13 12:13:21.000000000 +0900
@@ -424,7 +424,7 @@ efi_init (void)
 		} else if (memcmp(cp, "max_addr=", 9) == 0) {
 			max_addr = GRANULEROUNDDOWN(memparse(cp + 9, &cp));
 		} else if (memcmp(cp, "kernelcore=",11) == 0) {
-			cmdline_parse_kernelcore(cp+11);
+			cmdline_parse_kernelcore(cp+11, &cp);
 		} else if (memcmp(cp, "min_addr=", 9) == 0) {
 			min_addr = GRANULEROUNDDOWN(memparse(cp + 9, &cp));
 		} else {
Index: current_test/mm/page_alloc.c
===================================================================
--- current_test.orig/mm/page_alloc.c	2007-04-12 18:25:37.000000000 +0900
+++ current_test/mm/page_alloc.c	2007-04-13 12:12:58.000000000 +0900
@@ -3736,13 +3736,13 @@ void __init free_area_init_nodes(unsigne
  * kernelcore=size sets the amount of memory for use for allocations that
  * cannot be reclaimed or migrated.
  */
-int __init cmdline_parse_kernelcore(char *p)
+int __init cmdline_parse_kernelcore(char *p, char **retp)
 {
 	unsigned long long coremem;
 	if (!p)
 		return -EINVAL;
 
-	coremem = memparse(p, &p);
+	coremem = memparse(p, retp);
 	required_kernelcore = coremem >> PAGE_SHIFT;
 
 	/* Paranoid check that UL is enough for required_kernelcore */
Index: current_test/include/linux/mm.h
===================================================================
--- current_test.orig/include/linux/mm.h	2007-04-11 14:15:33.000000000 +0900
+++ current_test/include/linux/mm.h	2007-04-13 12:12:20.000000000 +0900
@@ -1051,7 +1051,7 @@ extern unsigned long find_max_pfn_with_a
 extern void free_bootmem_with_active_regions(int nid,
 						unsigned long max_low_pfn);
 extern void sparse_memory_present_with_active_regions(int nid);
-extern int cmdline_parse_kernelcore(char *p);
+extern int cmdline_parse_kernelcore(char *p, char **retp);
 #ifndef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
 extern int early_pfn_to_nid(unsigned long pfn);
 #endif /* CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID */

-- 
Yasunori Goto 



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-04-24 11:55 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-13  5:26 [PATCH]Fix parsing kernelcore boot option for ia64 Yasunori Goto
2007-04-16 13:29 ` Mel Gorman
2007-04-22  6:22 ` Andrew Morton
2007-04-23 11:46   ` Yasunori Goto
2007-04-23 13:06     ` Mel Gorman
2007-04-23 18:32     ` Mel Gorman
2007-04-23 18:36       ` Mel Gorman
2007-04-24  9:58         ` Yasunori Goto
2007-04-24 10:09           ` Mel Gorman
2007-04-24 11:50           ` Mel Gorman
2007-04-24  0:26       ` KAMEZAWA Hiroyuki
2007-04-24  7:31         ` Yasunori Goto
2007-04-24 11:55           ` Mel Gorman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox