public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: only put e820 ram entries in resource tree
@ 2008-08-24 22:44 Yinghai Lu
  2008-08-25  2:52 ` Eric W. Biederman
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Yinghai Lu @ 2008-08-24 22:44 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Andrew Morton
  Cc: linux-kernel, Yinghai Lu, Bernhard Walle, Vivek Goyal,
	Eric W. Biederman

may need user to have new kexec tools that could create e820 table
from /sys/firmware/memmap instead of /proc/iomem for second kernel

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Bernhard Walle <bwalle@suse.de>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>

Index: linux-2.6/arch/x86/kernel/e820.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/e820.c
+++ linux-2.6/arch/x86/kernel/e820.c
@@ -1279,6 +1279,10 @@ void __init e820_reserve_resources(void)
 
 	res = alloc_bootmem_low(sizeof(struct resource) * e820.nr_map);
 	for (i = 0; i < e820.nr_map; i++) {
+		if (e820.map[i].type != E820_RAM) {
+			res++;
+			continue;
+		}
 		end = e820.map[i].addr + e820.map[i].size - 1;
 #ifndef CONFIG_RESOURCES_64BIT
 		if (end > 0x100000000ULL) {

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

end of thread, other threads:[~2008-08-26  8:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-24 22:44 [PATCH] x86: only put e820 ram entries in resource tree Yinghai Lu
2008-08-25  2:52 ` Eric W. Biederman
2008-08-25  3:43   ` Yinghai Lu
2008-08-25  7:17   ` Ingo Molnar
2008-08-25 13:30     ` Eric W. Biederman
2008-08-25 17:08       ` Yinghai Lu
2008-08-25  8:39 ` Bernhard Walle
2008-08-25 17:13   ` Yinghai Lu
2008-08-26  8:20     ` Bernhard Walle
2008-08-25 14:19 ` Vivek Goyal
2008-08-25 17:11   ` Yinghai Lu

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