X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Farm26%2Fmm%2Finit.c;fp=arch%2Farm26%2Fmm%2Finit.c;h=1f09a9d0fb8375297c97f38d2907f3f03793bfaf;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=562fac12eb95762dc3e7ed0f5b089a49e42b1690;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/arch/arm26/mm/init.c b/arch/arm26/mm/init.c index 562fac12e..1f09a9d0f 100644 --- a/arch/arm26/mm/init.c +++ b/arch/arm26/mm/init.c @@ -7,6 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#include #include #include #include @@ -22,7 +23,6 @@ #include #include #include -#include #include #include @@ -101,6 +101,12 @@ struct node_info { int bootmap_pages; }; +#define PFN_DOWN(x) ((x) >> PAGE_SHIFT) +#define PFN_UP(x) (PAGE_ALIGN(x) >> PAGE_SHIFT) +#define PFN_SIZE(x) ((x) >> PAGE_SHIFT) +#define PFN_RANGE(s,e) PFN_SIZE(PAGE_ALIGN((unsigned long)(e)) - \ + (((unsigned long)(s)) & PAGE_MASK)) + /* * FIXME: We really want to avoid allocating the bootmap bitmap * over the top of the initrd. Hopefully, this is located towards @@ -318,7 +324,7 @@ static inline void free_area(unsigned long addr, unsigned long end, char *s) for (; addr < end; addr += PAGE_SIZE) { struct page *page = virt_to_page(addr); ClearPageReserved(page); - init_page_count(page); + set_page_count(page, 1); free_page(addr); totalram_pages++; }