Commit a18d0e2d authored by Jiang Liu's avatar Jiang Liu Committed by Linus Torvalds

mm/s390: prepare for removing num_physpages and simplify mem_init()

Prepare for removing num_physpages and simplify mem_init().
Signed-off-by: default avatarJiang Liu <jiang.liu@huawei.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 369a9d85
...@@ -135,9 +135,7 @@ void __init paging_init(void) ...@@ -135,9 +135,7 @@ void __init paging_init(void)
void __init mem_init(void) void __init mem_init(void)
{ {
unsigned long codesize, reservedpages, datasize, initsize; max_mapnr = max_low_pfn;
max_mapnr = num_physpages = max_low_pfn;
high_memory = (void *) __va(max_low_pfn * PAGE_SIZE); high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
/* Setup guest page hinting */ /* Setup guest page hinting */
...@@ -147,18 +145,7 @@ void __init mem_init(void) ...@@ -147,18 +145,7 @@ void __init mem_init(void)
free_all_bootmem(); free_all_bootmem();
setup_zero_pages(); /* Setup zeroed pages. */ setup_zero_pages(); /* Setup zeroed pages. */
reservedpages = 0; mem_init_print_info(NULL);
codesize = (unsigned long) &_etext - (unsigned long) &_text;
datasize = (unsigned long) &_edata - (unsigned long) &_etext;
initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
printk("Memory: %luk/%luk available (%ldk kernel code, %ldk reserved, %ldk data, %ldk init)\n",
nr_free_pages() << (PAGE_SHIFT-10),
max_mapnr << (PAGE_SHIFT-10),
codesize >> 10,
reservedpages << (PAGE_SHIFT-10),
datasize >>10,
initsize >> 10);
printk("Write protected kernel read-only data: %#lx - %#lx\n", printk("Write protected kernel read-only data: %#lx - %#lx\n",
(unsigned long)&_stext, (unsigned long)&_stext,
PFN_ALIGN((unsigned long)&_eshared) - 1); PFN_ALIGN((unsigned long)&_eshared) - 1);
......
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