diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 585000c98d3e57ff1a3c88fa34342b91536f2e53..bb8c69079c788a89eae5f49f76881ccb5ce241f5 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -40,10 +40,10 @@ * user can e.g. boot the original kernel with mem=1G while still booting the * next kernel with full memory. */ -static struct e820map initial_e820; -static struct e820map initial_e820_saved; -struct e820map *e820 = &initial_e820; -struct e820map *e820_saved = &initial_e820_saved; +static struct e820map initial_e820 __initdata; +static struct e820map initial_e820_saved __initdata; +struct e820map *e820 __refdata = &initial_e820; +struct e820map *e820_saved __refdata = &initial_e820_saved; /* For PCI or other memory-mapped resources */ unsigned long pci_mem_start = 0xaeedbabe; diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index 167deae767cb80d960b62c5208f4f030e2e13951..22af912d66d258f413414c7355ac82da2814b074 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -699,9 +699,9 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) } } -void free_initmem(void) +void __ref free_initmem(void) { - /* e820_reallocate_tables(); - disabled for now */ + e820_reallocate_tables(); free_init_pages("unused kernel", (unsigned long)(&__init_begin),