From: Yasunori Goto <y-goto@jp.fujitsu.com>
To: mel@skynet.ie (Mel Gorman)
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
tony.luck@intel.com,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: [PATCH]Fix parsing kernelcore boot option for ia64
Date: Tue, 24 Apr 2007 16:31:31 +0900 [thread overview]
Message-ID: <20070424162320.FD92.Y-GOTO@jp.fujitsu.com> (raw)
In-Reply-To: <20070424092625.b2b24a76.kamezawa.hiroyu@jp.fujitsu.com>
Mel-san.
I tested your patch (Thanks!). It worked. But......
> In my understanding, why ia64 doesn't use early_param() macro for mem= at el. is that
> it has to use mem= option at efi handling which is called before parse_early_param().
>
> Current ia64's boot path is
> setup_arch()
> -> efi handling -> parse_early_param() -> numa handling -> pgdat/zone init
>
> kernelcore= option is just used at pgdat/zone initialization. (no arch dependent part...)
>
> So I think just adding
> ==
> early_param("kernelcore",cmpdline_parse_kernelcore)
> ==
> to ia64 is ok.....
Then, it can be common code.
How is this patch? I confirmed this can work well too.
--------
When "kernelcore" boot option is specified, kernel can't boot up
on ia64. It is cause of eternal loop.
In addition, its code can be common code. This is fix for it.
I tested this patch on my ia64 box.
Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
---------
arch/i386/kernel/setup.c | 1 -
arch/ia64/kernel/efi.c | 2 --
arch/powerpc/kernel/prom.c | 1 -
arch/ppc/mm/init.c | 2 --
arch/x86_64/kernel/e820.c | 1 -
include/linux/mm.h | 1 -
mm/page_alloc.c | 3 +++
7 files changed, 3 insertions(+), 8 deletions(-)
Index: kernelcore/arch/ia64/kernel/efi.c
===================================================================
--- kernelcore.orig/arch/ia64/kernel/efi.c 2007-04-24 15:09:37.000000000 +0900
+++ kernelcore/arch/ia64/kernel/efi.c 2007-04-24 15:25:22.000000000 +0900
@@ -423,8 +423,6 @@ efi_init (void)
mem_limit = memparse(cp + 4, &cp);
} 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);
} else if (memcmp(cp, "min_addr=", 9) == 0) {
min_addr = GRANULEROUNDDOWN(memparse(cp + 9, &cp));
} else {
Index: kernelcore/arch/i386/kernel/setup.c
===================================================================
--- kernelcore.orig/arch/i386/kernel/setup.c 2007-04-24 15:29:20.000000000 +0900
+++ kernelcore/arch/i386/kernel/setup.c 2007-04-24 15:29:39.000000000 +0900
@@ -195,7 +195,6 @@ static int __init parse_mem(char *arg)
return 0;
}
early_param("mem", parse_mem);
-early_param("kernelcore", cmdline_parse_kernelcore);
#ifdef CONFIG_PROC_VMCORE
/* elfcorehdr= specifies the location of elf core header
Index: kernelcore/arch/powerpc/kernel/prom.c
===================================================================
--- kernelcore.orig/arch/powerpc/kernel/prom.c 2007-04-24 15:04:47.000000000 +0900
+++ kernelcore/arch/powerpc/kernel/prom.c 2007-04-24 15:30:25.000000000 +0900
@@ -431,7 +431,6 @@ static int __init early_parse_mem(char *
return 0;
}
early_param("mem", early_parse_mem);
-early_param("kernelcore", cmdline_parse_kernelcore);
/*
* The device tree may be allocated below our memory limit, or inside the
Index: kernelcore/arch/ppc/mm/init.c
===================================================================
--- kernelcore.orig/arch/ppc/mm/init.c 2007-04-24 15:04:47.000000000 +0900
+++ kernelcore/arch/ppc/mm/init.c 2007-04-24 15:30:56.000000000 +0900
@@ -214,8 +214,6 @@ void MMU_setup(void)
}
}
-early_param("kernelcore", cmdline_parse_kernelcore);
-
/*
* MMU_init sets up the basic memory mappings for the kernel,
* including both RAM and possibly some I/O regions,
Index: kernelcore/arch/x86_64/kernel/e820.c
===================================================================
--- kernelcore.orig/arch/x86_64/kernel/e820.c 2007-04-24 15:04:47.000000000 +0900
+++ kernelcore/arch/x86_64/kernel/e820.c 2007-04-24 15:34:02.000000000 +0900
@@ -604,7 +604,6 @@ static int __init parse_memopt(char *p)
return 0;
}
early_param("mem", parse_memopt);
-early_param("kernelcore", cmdline_parse_kernelcore);
static int userdef __initdata;
Index: kernelcore/include/linux/mm.h
===================================================================
--- kernelcore.orig/include/linux/mm.h 2007-04-24 15:09:37.000000000 +0900
+++ kernelcore/include/linux/mm.h 2007-04-24 15:35:52.000000000 +0900
@@ -1051,7 +1051,6 @@ 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);
#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 */
Index: kernelcore/mm/page_alloc.c
===================================================================
--- kernelcore.orig/mm/page_alloc.c 2007-04-24 15:09:37.000000000 +0900
+++ kernelcore/mm/page_alloc.c 2007-04-24 16:00:21.000000000 +0900
@@ -3728,6 +3728,9 @@ int __init cmdline_parse_kernelcore(char
return 0;
}
+
+early_param("kernelcore", cmdline_parse_kernelcore);
+
#endif /* CONFIG_ARCH_POPULATES_NODE_MAP */
/**
--
Yasunori Goto
next prev parent reply other threads:[~2007-04-24 7:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=20070424162320.FD92.Y-GOTO@jp.fujitsu.com \
--to=y-goto@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mel@skynet.ie \
--cc=tony.luck@intel.com \
/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