From 54b81a029a2a96419c3284282739bb34a6fed71d Mon Sep 17 00:00:00 2001 From: Kanoj Sarcar Date: Sat, 25 Mar 2000 02:07:23 +0000 Subject: 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. --- arch/mips64/sgi-ip27/ip27-memory.c | 9 +++++++-- 1 file 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 @@ -309,6 +309,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. */ @@ -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; -- cgit v1.2.3