mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yasunori Goto <y-goto@jp.fujitsu.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Mel Gorman <mel@csn.ul.ie>,
	Linux Kernel ML <linux-kernel@vger.kernel.org>
Subject: [PATCH]Fix parsing kernelcore boot option for ia64
Date: Fri, 13 Apr 2007 14:26:22 +0900	[thread overview]
Message-ID: <20070413140533.A239.Y-GOTO@jp.fujitsu.com> (raw)

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 



             reply	other threads:[~2007-04-13  5:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-13  5:26 Yasunori Goto [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070413140533.A239.Y-GOTO@jp.fujitsu.com \
    --to=y-goto@jp.fujitsu.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mel@csn.ul.ie \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®