Commit 15803a43 authored by Magnus Damm's avatar Magnus Damm Committed by Andi Kleen

[PATCH] x86-64: setup saved_max_pfn correctly (kdump)

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: default avatarMagnus Damm <magnus@valinux.co.jp>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent 5e58a02a
...@@ -594,7 +594,9 @@ static int __init parse_memmap_opt(char *p) ...@@ -594,7 +594,9 @@ static int __init parse_memmap_opt(char *p)
* size before original memory map is * size before original memory map is
* reset. * reset.
*/ */
e820_register_active_regions(0, 0, -1UL);
saved_max_pfn = e820_end_of_ram(); saved_max_pfn = e820_end_of_ram();
remove_all_active_ranges();
#endif #endif
end_pfn_map = 0; end_pfn_map = 0;
e820.nr_map = 0; e820.nr_map = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment