summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCliff Wickman <cpw@sgi.com>2013-02-25 12:00:07 -0600
committerSimon Horman <horms@verge.net.au>2013-03-05 10:46:03 +0900
commit6df15d1cca55b2cd59c79aed69f004e1b2a6ba36 (patch)
tree4da2e941135849e601852243f0160163a2b11771
parent47cfdc16a9565262a32c4a32a23387068e969d2a (diff)
downloadkexec-tools-6df15d1cca55b2cd59c79aed69f004e1b2a6ba36.tar.gz
kexec x86: drop truncation warning for crash kernel
On kexec set-up of a crash kernel on a very large memory machine we sometimes see the worrisome warning: Too many memory ranges, truncating... meaning that the total count of e820 ram, reserved and ACPI spaces is over 128. Per the comment in do_bzImage_load(): /* If using bzImage for capture kernel, then we will not be * executing real mode code. setup segment can be loaded * anywhere as we will be just reading command line. */ So if I understand, the e820 table built here and added to the 'real_mode' area is not going to be used. So the warning message can be omitted. Signed-off-by: Cliff Wickman <cpw@sgi.com> [ horms@verge.net.au manually applied due to conflict ] Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/arch/i386/x86-linux-setup.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/kexec/arch/i386/x86-linux-setup.c b/kexec/arch/i386/x86-linux-setup.c
index e0ddc845..b903d43d 100644
--- a/kexec/arch/i386/x86-linux-setup.c
+++ b/kexec/arch/i386/x86-linux-setup.c
@@ -34,6 +34,7 @@
#include "../../kexec.h"
#include "kexec-x86.h"
#include "x86-linux-setup.h"
+#include "../../kexec/kexec-syscall.h"
void init_linux_parameters(struct x86_linux_param_header *real_mode)
{
@@ -507,7 +508,13 @@ void setup_linux_system_parameters(struct kexec_info *info,
range = info->memory_range;
ranges = info->memory_ranges;
if (ranges > E820MAX) {
- fprintf(stderr, "Too many memory ranges, truncating...\n");
+ if (!(kexec_flags & KEXEC_ON_CRASH))
+ /*
+ * this e820 not used for capture kernel, see
+ * do_bzImage_load()
+ */
+ fprintf(stderr,
+ "Too many memory ranges, truncating...\n");
ranges = E820MAX;
}
real_mode->e820_map_nr = ranges;