File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -46,10 +46,12 @@ void __init bootmem_init(unsigned long mem_sz)
4646 * Give all the memory to the bootmap allocator, tell it to put the
4747 * boot mem_map at the start of memory.
4848 */
49- max_low_pfn = virt_to_pfn ((void * )memory_end );
50- min_low_pfn = virt_to_pfn ((void * )memory_start );
5149 memblock_add (__pa (memory_start ), mem_size );
5250
51+ max_pfn = max_low_pfn = virt_to_pfn ((void * )memory_end );
52+ min_low_pfn = virt_to_pfn ((void * )memory_start );
53+ set_max_mapnr (max_pfn - ARCH_PFN_OFFSET );
54+
5355 empty_zero_page = memblock_alloc (PAGE_SIZE , PAGE_SIZE );
5456 memset (empty_zero_page , 0 , PAGE_SIZE );
5557
@@ -60,9 +62,6 @@ void __init bootmem_init(unsigned long mem_sz)
6062void __init mem_init (void )
6163{
6264 memblock_free_all ();
63- max_mapnr = totalram_pages ();
64- max_low_pfn = max_mapnr + ARCH_PFN_OFFSET ;
65- max_pfn = max_mapnr + ARCH_PFN_OFFSET ;
6665}
6766
6867/*
You can’t perform that action at this time.
0 commit comments