From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Cc: Vivek Goyal <vgoyal@in.ibm.com>, Andrew Morton <akpm@osdl.org>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 17/17] [PATCH] i386: export memory more than 4G through /proc/iomem
Date: Tue, 27 Jun 2006 09:33:53 -0700 [thread overview]
Message-ID: <11514260903519-git-send-email-greg@kroah.com> (raw)
In-Reply-To: <11514260871162-git-send-email-greg@kroah.com>
From: Vivek Goyal <vgoyal@in.ibm.com>
Currently /proc/iomem exports physical memory also apart from io device
memory. But on i386, it truncates any memory more than 4GB. This leads to
problems for kexec/kdump.
Kexec reads /proc/iomem to determine the system memory layout and prepares a
memory map based on that and passes it to the kernel being kexeced. Given the
fact that memory more than 4GB has been truncated, new kernel never gets to
see and use that memory.
Kdump also reads /proc/iomem to determine the physical memory layout of the
system and encodes this informaiton in ELF headers. After a crash new kernel
parses these ELF headers being used by previous kernel and vmcore is prepared
accordingly. As memory more than 4GB has been truncated, kdump never sees
that memory and never prepares ELF headers for it. Hence vmcore is truncated
and limited to 4GB even if there is more physical memory in the system.
This patch exports memory more than 4GB through /proc/iomem on i386.
Cc: Maneesh Soni <maneesh@in.ibm.com>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/i386/kernel/setup.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 4a65040..6712f0d 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -1314,8 +1314,10 @@ legacy_init_iomem_resources(struct resou
probe_roms();
for (i = 0; i < e820.nr_map; i++) {
struct resource *res;
+#ifndef CONFIG_RESOURCES_64BIT
if (e820.map[i].addr + e820.map[i].size > 0x100000000ULL)
continue;
+#endif
res = kzalloc(sizeof(struct resource), GFP_ATOMIC);
switch (e820.map[i].type) {
case E820_RAM: res->name = "System RAM"; break;
--
1.4.0
prev parent reply other threads:[~2006-06-27 16:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-27 16:33 [GIT PATCH] 64bit resource patches for 2.6.17 Greg KH
2006-06-27 16:33 ` [PATCH 1/17] [PATCH] 64bit resource: C99 changes for struct resource declarations Greg KH
2006-06-27 16:33 ` [PATCH 2/17] [PATCH] 64bit resource: fix up printks for resources in sound drivers Greg KH
2006-06-27 16:33 ` [PATCH 3/17] [PATCH] 64bit resource: fix up printks for resources in networks drivers Greg KH
2006-06-27 16:33 ` [PATCH 4/17] [PATCH] 64bit resource: fix up printks for resources in pci core and hotplug drivers Greg KH
2006-06-27 16:33 ` [PATCH 5/17] [PATCH] 64bit resource: fix up printks for resources in mtd drivers Greg KH
2006-06-27 16:33 ` [PATCH 6/17] [PATCH] 64bit resource: fix up printks for resources in ide drivers Greg KH
2006-06-27 16:33 ` [PATCH 7/17] [PATCH] 64bit resource: fix up printks for resources in video drivers Greg KH
2006-06-27 16:33 ` [PATCH 8/17] [PATCH] 64bit resource: fix up printks for resources in pcmcia drivers Greg KH
2006-06-27 16:33 ` [PATCH 9/17] [PATCH] 64bit resource: fix up printks for resources in arch and core code Greg KH
2006-06-27 16:33 ` [PATCH 10/17] [PATCH] 64bit resource: fix up printks for resources in misc drivers Greg KH
2006-06-27 16:33 ` [PATCH 11/17] [PATCH] 64bit resource: introduce resource_size_t for the start and end of struct resource Greg KH
2006-06-27 16:33 ` [PATCH 12/17] [PATCH] 64bit resource: change resource core to use resource_size_t Greg KH
2006-06-27 16:33 ` [PATCH 13/17] [PATCH] 64bit resource: change pci core and arch code " Greg KH
2006-06-27 16:33 ` [PATCH 14/17] [PATCH] 64bit resource: change pnp core " Greg KH
2006-06-27 16:33 ` [PATCH 15/17] [PATCH] 64bit Resource: convert a few remaining drivers to use resource_size_t where needed Greg KH
2006-06-27 16:33 ` [PATCH 16/17] [PATCH] 64bit Resource: finally enable 64bit resource sizes Greg KH
2006-06-27 16:33 ` Greg KH [this message]
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=11514260903519-git-send-email-greg@kroah.com \
--to=greg@kroah.com \
--cc=akpm@osdl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=vgoyal@in.ibm.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