From: Vivek Goyal <[email protected]> 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 <[email protected]> Cc: Vivek Goyal <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> --- 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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- References:
- [GIT PATCH] 64bit resource patches for 2.6.17
- From: Greg KH <[email protected]>
- [PATCH 1/17] [PATCH] 64bit resource: C99 changes for struct resource declarations
- From: Greg KH <[email protected]>
- [PATCH 2/17] [PATCH] 64bit resource: fix up printks for resources in sound drivers
- From: Greg KH <[email protected]>
- [PATCH 3/17] [PATCH] 64bit resource: fix up printks for resources in networks drivers
- From: Greg KH <[email protected]>
- [PATCH 4/17] [PATCH] 64bit resource: fix up printks for resources in pci core and hotplug drivers
- From: Greg KH <[email protected]>
- [PATCH 5/17] [PATCH] 64bit resource: fix up printks for resources in mtd drivers
- From: Greg KH <[email protected]>
- [PATCH 6/17] [PATCH] 64bit resource: fix up printks for resources in ide drivers
- From: Greg KH <[email protected]>
- [PATCH 7/17] [PATCH] 64bit resource: fix up printks for resources in video drivers
- From: Greg KH <[email protected]>
- [PATCH 8/17] [PATCH] 64bit resource: fix up printks for resources in pcmcia drivers
- From: Greg KH <[email protected]>
- [PATCH 9/17] [PATCH] 64bit resource: fix up printks for resources in arch and core code
- From: Greg KH <[email protected]>
- [PATCH 10/17] [PATCH] 64bit resource: fix up printks for resources in misc drivers
- From: Greg KH <[email protected]>
- [PATCH 11/17] [PATCH] 64bit resource: introduce resource_size_t for the start and end of struct resource
- From: Greg KH <[email protected]>
- [PATCH 12/17] [PATCH] 64bit resource: change resource core to use resource_size_t
- From: Greg KH <[email protected]>
- [PATCH 13/17] [PATCH] 64bit resource: change pci core and arch code to use resource_size_t
- From: Greg KH <[email protected]>
- [PATCH 14/17] [PATCH] 64bit resource: change pnp core to use resource_size_t
- From: Greg KH <[email protected]>
- [PATCH 15/17] [PATCH] 64bit Resource: convert a few remaining drivers to use resource_size_t where needed
- From: Greg KH <[email protected]>
- [PATCH 16/17] [PATCH] 64bit Resource: finally enable 64bit resource sizes
- From: Greg KH <[email protected]>
- [GIT PATCH] 64bit resource patches for 2.6.17
- Prev by Date: [PATCH 12/17] [PATCH] 64bit resource: change resource core to use resource_size_t
- Next by Date: [PATCH 13/17] [PATCH] 64bit resource: change pci core and arch code to use resource_size_t
- Previous by thread: [PATCH 16/17] [PATCH] 64bit Resource: finally enable 64bit resource sizes
- Next by thread: Regression in -git / [PATCH] i2c-i801.c: don't pci_disable_device() after it was just enabled
- Index(es):