public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] kexec x86: drop truncation warning for crash kernel
@ 2013-02-25 18:00 Cliff Wickman
  2013-03-05  1:53 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Cliff Wickman @ 2013-02-25 18:00 UTC (permalink / raw)
  To: kexec

From: Cliff Wickman <cpw@sgi.com>

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>
---
 kexec/arch/i386/x86-linux-setup.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Index: kexec-tools-2.0.4-rc1/kexec/arch/i386/x86-linux-setup.c
===================================================================
--- kexec-tools-2.0.4-rc1.orig/kexec/arch/i386/x86-linux-setup.c
+++ kexec-tools-2.0.4-rc1/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)
 {
@@ -491,7 +492,13 @@ void setup_linux_system_parameters(struc
 		die("Cannot get memory information\n");
 	}
 	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;

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

* Re: [PATCH] kexec x86: drop truncation warning for crash kernel
  2013-02-25 18:00 [PATCH] kexec x86: drop truncation warning for crash kernel Cliff Wickman
@ 2013-03-05  1:53 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2013-03-05  1:53 UTC (permalink / raw)
  To: Cliff Wickman; +Cc: kexec

On Mon, Feb 25, 2013 at 12:00:07PM -0600, Cliff Wickman wrote:
> From: Cliff Wickman <cpw@sgi.com>
> 
> 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.

Thanks, applied.

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

end of thread, other threads:[~2013-03-05  1:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-25 18:00 [PATCH] kexec x86: drop truncation warning for crash kernel Cliff Wickman
2013-03-05  1:53 ` Simon Horman

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