All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86_64: setup saved_max_pfn correctly (kdump)
@ 2006-11-02 13:19 Magnus Damm
  2006-11-02 14:28 ` Vivek Goyal
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Magnus Damm @ 2006-11-02 13:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mel Gorman, Vivek Goyal, Andi Kleen, magnus.damm, fastboot,
	Magnus Damm

x86_64: setup saved_max_pfn correctly

2.6.19-rc4 has broken CONFIG_CRASH_DUMP support on x86_64. It is impossible 
to read out the kernel contents from /proc/vmcore because saved_max_pfn is set
to zero instead of the max_pfn value before the user map is setup.

This happens because saved_max_pfn is initialized at parse_early_param() time,
and at this time no active regions have been registered. save_max_pfn is setup
from e820_end_of_ram(), more exact find_max_pfn_with_active_regions() which
returns 0 because no regions exist.

This patch fixes this by registering before and removing after the call
to e820_end_of_ram().

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
---

 Applies to 2.6.19-rc4.

 arch/x86_64/kernel/e820.c |    2 ++
 1 file changed, 2 insertions(+)

--- 0002/arch/x86_64/kernel/e820.c
+++ work/arch/x86_64/kernel/e820.c	2006-11-02 21:37:19.000000000 +0900
@@ -594,7 +594,9 @@ static int __init parse_memmap_opt(char 
 		 * size before original memory map is
 		 * reset.
 		 */
+		e820_register_active_regions(0, 0, -1UL);
 		saved_max_pfn = e820_end_of_ram();
+		remove_all_active_ranges();
 #endif
 		end_pfn_map = 0;
 		e820.nr_map = 0;

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

end of thread, other threads:[~2006-11-02 22:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-02 13:19 [PATCH] x86_64: setup saved_max_pfn correctly (kdump) Magnus Damm
2006-11-02 14:28 ` Vivek Goyal
2006-11-02 17:40   ` Magnus Damm
2006-11-02 18:07     ` Vivek Goyal
2006-11-02 16:08 ` Mel Gorman
2006-11-02 18:05   ` Magnus Damm
2006-11-02 18:20     ` Vivek Goyal
2006-11-02 18:28       ` Magnus Damm
2006-11-02 22:41     ` Mel Gorman
2006-11-02 17:40 ` Andi Kleen
2006-11-02 18:20   ` Magnus Damm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.