X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fmips%2Fsgi-ip27%2Fip27-memory.c;h=6c00dce9f73fbd386e3366700c69c71c5a46f5c8;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=0a44a98d7adc78efd05e1d0e89765872164f32c0;hpb=6a77f38946aaee1cd85eeec6cf4229b204c15071;p=linux-2.6.git diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c index 0a44a98d7..6c00dce9f 100644 --- a/arch/mips/sgi-ip27/ip27-memory.c +++ b/arch/mips/sgi-ip27/ip27-memory.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -28,8 +29,6 @@ #include -#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) - #define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT) #define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT) @@ -538,10 +537,10 @@ void __init mem_init(void) for_each_online_node(node) { unsigned slot, numslots; struct page *end, *p; - + /* - * This will free up the bootmem, ie, slot 0 memory. - */ + * This will free up the bootmem, ie, slot 0 memory. + */ totalram_pages += free_all_bootmem_node(NODE_DATA(node)); /* @@ -549,9 +548,8 @@ void __init mem_init(void) */ numslots = node_getlastslot(node); for (slot = 1; slot <= numslots; slot++) { - p = NODE_DATA(node)->node_mem_map + - (slot_getbasepfn(node, slot) - - slot_getbasepfn(node, 0)); + p = nid_page_nr(node, slot_getbasepfn(node, slot) - + slot_getbasepfn(node, 0)); /* * Free valid memory in current slot. @@ -560,7 +558,7 @@ void __init mem_init(void) /* if (!page_is_ram(pgnr)) continue; */ /* commented out until page_is_ram works */ ClearPageReserved(p); - set_page_count(p, 1); + init_page_count(p); __free_page(p); totalram_pages++; }