Commit 3475962a authored by David S. Miller's avatar David S. Miller

Sparc64: Keep totalram_pages equal to num_physpages.

parent e418695d
...@@ -1704,7 +1704,7 @@ void __init mem_init(void) ...@@ -1704,7 +1704,7 @@ void __init mem_init(void)
max_mapnr = last_valid_pfn - pfn_base; max_mapnr = last_valid_pfn - pfn_base;
high_memory = __va(last_valid_pfn << PAGE_SHIFT); high_memory = __va(last_valid_pfn << PAGE_SHIFT);
num_physpages = free_all_bootmem() - 1; totalram_pages = num_physpages = free_all_bootmem() - 1;
/* /*
* Set up the zero page, mark it reserved, so that page count * Set up the zero page, mark it reserved, so that page count
...@@ -1737,6 +1737,7 @@ void __init mem_init(void) ...@@ -1737,6 +1737,7 @@ void __init mem_init(void)
addr += alias_base; addr += alias_base;
free_pgd_fast((pgd_t *)addr); free_pgd_fast((pgd_t *)addr);
num_physpages++; num_physpages++;
totalram_pages++;
} }
#endif #endif
...@@ -1773,6 +1774,7 @@ void free_initmem (void) ...@@ -1773,6 +1774,7 @@ void free_initmem (void)
set_page_count(p, 1); set_page_count(p, 1);
__free_page(p); __free_page(p);
num_physpages++; num_physpages++;
totalram_pages++;
} }
} }
...@@ -1788,6 +1790,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) ...@@ -1788,6 +1790,7 @@ void free_initrd_mem(unsigned long start, unsigned long end)
set_page_count(p, 1); set_page_count(p, 1);
__free_page(p); __free_page(p);
num_physpages++; num_physpages++;
totalram_pages++;
} }
} }
#endif #endif
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