summaryrefslogtreecommitdiffstats
path: root/arch/mips64/mm/init.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-01-27 23:21:57 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-01-27 23:21:57 +0000
commit511bcd7c5924ce9e98ad1cb851988f7448dfef0f (patch)
tree6194d472814ef315450ee5fe190c3cbbdc762c49 /arch/mips64/mm/init.c
parent0a20dc624ae03f1acb9e72b704907f3b5c79cff9 (diff)
Bootmem fixes for IP22.
Diffstat (limited to 'arch/mips64/mm/init.c')
-rw-r--r--arch/mips64/mm/init.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/mips64/mm/init.c b/arch/mips64/mm/init.c
index 682db726c..473e798e8 100644
--- a/arch/mips64/mm/init.c
+++ b/arch/mips64/mm/init.c
@@ -1,4 +1,4 @@
-/* $Id: init.c,v 1.6 2000/01/17 03:46:25 ralf Exp $
+/* $Id: init.c,v 1.7 2000/01/27 01:05:24 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -354,7 +354,7 @@ extern int page_is_ram(unsigned long pagenr);
void __init mem_init(void)
{
unsigned long codesize, reservedpages, datasize, initsize;
- unsigned long tmp;
+ unsigned long tmp, nonram;
max_mapnr = num_physpages = max_low_pfn;
high_memory = (void *) __va(max_mapnr << PAGE_SHIFT);
@@ -362,13 +362,13 @@ void __init mem_init(void)
totalram_pages += free_all_bootmem();
totalram_pages -= setup_zero_pages(); /* Setup zeroed pages. */
- reservedpages = 0;
+ reservedpages = nonram = 0;
for (tmp = 0; tmp < max_low_pfn; tmp++)
- /*
- * Only count reserved RAM pages
- */
- if (page_is_ram(tmp) && PageReserved(mem_map+tmp))
- reservedpages++;
+ if (page_is_ram(tmp)) {
+ nonram++;
+ if (PageReserved(mem_map+tmp))
+ reservedpages++;
+ }
codesize = (unsigned long) &_etext - (unsigned long) &_ftext;
datasize = (unsigned long) &_edata - (unsigned long) &_fdata;
@@ -377,7 +377,7 @@ void __init mem_init(void)
printk("Memory: %luk/%luk available (%ldk kernel code, %ldk reserved, "
"%ldk data, %ldk init)\n",
(unsigned long) nr_free_pages << (PAGE_SHIFT-10),
- max_mapnr << (PAGE_SHIFT-10),
+ (max_mapnr - nonram) << (PAGE_SHIFT-10),
codesize >> 10,
reservedpages << (PAGE_SHIFT-10),
datasize >> 10,