summaryrefslogtreecommitdiffstats
path: root/arch/mips64
diff options
context:
space:
mode:
authorKanoj Sarcar <kanoj@engr.sgi.com>2000-09-07 18:49:36 +0000
committerKanoj Sarcar <kanoj@engr.sgi.com>2000-09-07 18:49:36 +0000
commitff3529cb1ff747a8d3694a3f86eb7de66d498fae (patch)
treea6066127a524df8d79a45bd3d2c5fbaf42892c34 /arch/mips64
parent1148a796fd1311ae65f87ab7215ebe472f2a24db (diff)
Delete usage of PG_skip flag from mips64-DISCONTIG code. It was only
being used to flag mem_map entries corresponding to holes for counting and reporting during boot time. The current code reports more accurate figures, based on what is found at szmem() time (the old code was reporting more total memory than szmem() had probed).
Diffstat (limited to 'arch/mips64')
-rw-r--r--arch/mips64/sgi-ip27/ip27-memory.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/arch/mips64/sgi-ip27/ip27-memory.c b/arch/mips64/sgi-ip27/ip27-memory.c
index c31e00667..fd47e0103 100644
--- a/arch/mips64/sgi-ip27/ip27-memory.c
+++ b/arch/mips64/sgi-ip27/ip27-memory.c
@@ -258,8 +258,8 @@ void __init mem_init(void)
extern unsigned long totalram_pages;
extern unsigned long setup_zero_pages(void);
cnodeid_t nid;
- unsigned long tmp, ram;
- unsigned long codesize, reservedpages, datasize, initsize;
+ unsigned long tmp;
+ unsigned long codesize, datasize, initsize;
int slot, numslots;
struct page *pg, *pslot;
pfn_t pgnr;
@@ -295,7 +295,6 @@ void __init mem_init(void)
* free up the pages that hold the memmap entries.
*/
while (pg < pslot) {
- pg->flags |= (1<<PG_skip);
pg++; pgnr++;
}
@@ -317,32 +316,17 @@ void __init mem_init(void)
totalram_pages -= setup_zero_pages(); /* This comes from node 0 */
- reservedpages = ram = 0;
- for (nid = 0; nid < numnodes; nid++) {
- for (tmp = PLAT_NODE_DATA_STARTNR(nid); tmp <
- (PLAT_NODE_DATA_STARTNR(nid) +
- PLAT_NODE_DATA_SIZE(nid)); tmp++) {
- /* Ignore holes */
- if (PageSkip(mem_map+tmp))
- continue;
- if (page_is_ram(tmp)) {
- ram++;
- if (PageReserved(mem_map+tmp))
- reservedpages++;
- }
- }
- }
-
codesize = (unsigned long) &_etext - (unsigned long) &_stext;
datasize = (unsigned long) &_edata - (unsigned long) &_fdata;
initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin;
+ tmp = (unsigned long) nr_free_pages();
printk("Memory: %luk/%luk available (%ldk kernel code, %ldk reserved, "
"%ldk data, %ldk init)\n",
- (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
- ram << (PAGE_SHIFT-10),
+ tmp << (PAGE_SHIFT-10),
+ num_physpages << (PAGE_SHIFT-10),
codesize >> 10,
- reservedpages << (PAGE_SHIFT-10),
+ (num_physpages - tmp) << (PAGE_SHIFT-10),
datasize >> 10,
initsize >> 10);
}