diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 585000c98d3e..bb8c69079c78 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 167deae767cb..22af912d66d2 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),