X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fmips%2Fsgi-ip27%2Fip27-memory.c;fp=arch%2Fmips%2Fsgi-ip27%2Fip27-memory.c;h=ef20d9ac0ba3d0d39d7510c46f465d41ea041932;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=efe6971fc800f7ebdb6fedce429a3345b5aaf881;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c index efe6971fc..ef20d9ac0 100644 --- a/arch/mips/sgi-ip27/ip27-memory.c +++ b/arch/mips/sgi-ip27/ip27-memory.c @@ -10,6 +10,7 @@ * On SGI IP27 the ARC memory configuration data is completly bogus but * alternate easier to use mechanisms are available. */ +#include #include #include #include @@ -18,7 +19,6 @@ #include #include #include -#include #include #include @@ -28,6 +28,8 @@ #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,8 +540,8 @@ void __init mem_init(void) 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)); /* @@ -557,7 +559,7 @@ void __init mem_init(void) /* if (!page_is_ram(pgnr)) continue; */ /* commented out until page_is_ram works */ ClearPageReserved(p); - init_page_count(p); + set_page_count(p, 1); __free_page(p); totalram_pages++; }