Commit 0be15526 authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar

x86: move saving e820_saved to setup_memory_map

so other path that will override memory_setup or
machine_specific_memory_setup could have e820_saved too.
Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Bernhard Walle <bwalle@suse.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 5dfcf14d
...@@ -1294,8 +1294,6 @@ char *__init default_machine_specific_memory_setup(void) ...@@ -1294,8 +1294,6 @@ char *__init default_machine_specific_memory_setup(void)
e820_add_region(HIGH_MEMORY, mem_size << 10, E820_RAM); e820_add_region(HIGH_MEMORY, mem_size << 10, E820_RAM);
} }
memcpy(&e820_saved, &e820, sizeof(struct e820map));
/* In case someone cares... */ /* In case someone cares... */
return who; return who;
} }
...@@ -1313,8 +1311,12 @@ char * __init __attribute__((weak)) memory_setup(void) ...@@ -1313,8 +1311,12 @@ char * __init __attribute__((weak)) memory_setup(void)
void __init setup_memory_map(void) void __init setup_memory_map(void)
{ {
char *who;
who = memory_setup();
memcpy(&e820_saved, &e820, sizeof(struct e820map));
printk(KERN_INFO "BIOS-provided physical RAM map:\n"); printk(KERN_INFO "BIOS-provided physical RAM map:\n");
e820_print_map(memory_setup()); e820_print_map(who);
} }
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
......
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