summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKanoj Sarcar <kanoj@engr.sgi.com>2000-03-25 02:07:23 +0000
committerKanoj Sarcar <kanoj@engr.sgi.com>2000-03-25 02:07:23 +0000
commit54b81a029a2a96419c3284282739bb34a6fed71d (patch)
tree34e4848a9ebeda1558b26a882f64ca0a1a7c26e1
parent4e0ca5de4a7164071b73bc6432c0c0135b6705b8 (diff)
Minor memory accounting bug fixes to get cat /proc/meminfo and bootup
Memory: report print sane values. Hack around a generic free_area_init_node() bug that can be removed once the generic code has been fixed.
-rw-r--r--arch/mips64/sgi-ip27/ip27-memory.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/mips64/sgi-ip27/ip27-memory.c b/arch/mips64/sgi-ip27/ip27-memory.c
index eb5ac3c87..0394d2ca0 100644
--- a/arch/mips64/sgi-ip27/ip27-memory.c
+++ b/arch/mips64/sgi-ip27/ip27-memory.c
@@ -310,6 +310,11 @@ void __init mem_init(void)
for (nid = 0; nid < numnodes; nid++) {
/*
+ * Hack till free_area_init_core() zeroes free_pages
+ */
+ for (tmp = 0; tmp < MAX_NR_ZONES; tmp++)
+ PLAT_NODE_DATA(nid)->gendata.node_zones[tmp].free_pages=0;
+ /*
* This will free up the bootmem, ie, slot 0 memory.
*/
totalram_pages += free_all_bootmem_node(nid);
@@ -354,8 +359,8 @@ void __init mem_init(void)
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) >> PAGE_SHIFT)); tmp++) {
+ (PLAT_NODE_DATA_STARTNR(nid) +
+ PLAT_NODE_DATA_SIZE(nid)); tmp++) {
/* Ignore holes */
if (PageSkip(mem_map+tmp))
continue;