From: Zhang Yanfei <zhangyanfei.yes@gmail.com>
To: Simon Horman <horms@verge.net.au>
Cc: "kexec@lists.infradead.org" <kexec@lists.infradead.org>,
"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 2/4] kexec-tools: ppc: Remove saved_max_mem
Date: Sun, 26 May 2013 11:40:45 +0800 [thread overview]
Message-ID: <51A1843D.3060706@gmail.com> (raw)
In-Reply-To: <51A183B0.7000607@gmail.com>
From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
saved_max_mem is used to calculate the amount of memory that the previous
kernel used. And passed to the dump-capture kernel by kernel commandline
parameter "savemaxmem=". But in the dump-capture kernel, we never use
this parameter now, so remove saved_max_mem and don't add "savemaxmem="
to new kernel commandline.
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
---
kexec/arch/ppc/crashdump-powerpc.c | 19 -------------------
1 files changed, 0 insertions(+), 19 deletions(-)
diff --git a/kexec/arch/ppc/crashdump-powerpc.c b/kexec/arch/ppc/crashdump-powerpc.c
index eee5b37..c06d310 100644
--- a/kexec/arch/ppc/crashdump-powerpc.c
+++ b/kexec/arch/ppc/crashdump-powerpc.c
@@ -51,17 +51,6 @@ static int crash_max_memory_ranges;
*/
mem_rgns_t usablemem_rgns = {0, NULL};
-/*
- * To store the memory size of the first kernel and this value will be
- * passed to the second kernel as command line (savemaxmem=xM).
- * The second kernel will be calculated saved_max_pfn based on this
- * variable.
- * Since we are creating/using usable-memory property, there is no way
- * we can determine the RAM size unless parsing the device-tree/memoy@/reg
- * property in the kernel.
- */
-unsigned long long saved_max_mem;
-
/* Reads the appropriate file and retrieves the SYSTEM RAM regions for whom to
* create Elf headers. Keeping it separate from get_memory_ranges() as
* requirements are different in the case of normal kexec and crashdumps.
@@ -224,13 +213,6 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges)
crash_memory_range[memory_ranges].start = cstart;
crash_memory_range[memory_ranges++].end = cend;
}
- /*
- * Can not trust the memory regions order that we read from
- * device-tree. Hence, get the MAX end value.
- */
- for (i = 0; i < memory_ranges; i++)
- if (saved_max_mem < crash_memory_range[i].end)
- saved_max_mem = crash_memory_range[i].end;
*range = crash_memory_range;
*ranges = memory_ranges;
@@ -378,7 +360,6 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline,
* read by flatten_device_tree and modified if required
*/
add_cmdline_param(mod_cmdline, elfcorehdr, " elfcorehdr=", "K");
- add_cmdline_param(mod_cmdline, saved_max_mem, " savemaxmem=", "M");
add_cmdline(mod_cmdline, " maxcpus=1");
return 0;
}
--
1.7.1
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2013-05-26 3:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-26 3:38 [PATCH 0/4] kexec-tools: Remove saved_max_mem Zhang Yanfei
2013-05-26 3:40 ` [PATCH 1/4] kexec-tools: mips: " Zhang Yanfei
2013-05-26 3:40 ` Zhang Yanfei [this message]
2013-05-26 3:41 ` [PATCH 3/4] kexec-tools: ppc64: " Zhang Yanfei
2013-05-26 3:41 ` [PATCH 4/4] kexec-tools: sh: " Zhang Yanfei
2013-05-28 22:35 ` [PATCH 0/4] kexec-tools: " Eric W. Biederman
2013-06-10 8:35 ` Simon Horman
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=51A1843D.3060706@gmail.com \
--to=zhangyanfei.yes@gmail.com \
--cc=ebiederm@xmission.com \
--cc=horms@verge.net.au \
--cc=kexec@lists.infradead.org \
/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