summaryrefslogtreecommitdiff
path: root/arch/ia64/mm/init.c
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2002-05-03 00:03:30 -0700
committerRussell King <rmk@arm.linux.org.uk>2002-05-03 00:03:30 -0700
commit5528f050dc6302b7f3cf66b97c5426f25ecfc6cc (patch)
treeec3dedf4b740349f246460fcbb5e2698da1741ae /arch/ia64/mm/init.c
parent31efb48daafb03968411eb62e456df22796a8c9e (diff)
[PATCH] 2.5.13: remove VALID_PAGE
This patch removes VALID_PAGE(), as the test was always too late for discontinous memory configuration. It is replaced with pfn_valid()/ virt_addr_valid(), which are used to test the original input value. Other helper functions: pte_pfn() - extract the page number from a pte pfn_to_page()/page_to_pfn() - convert a page number to/from a page struct
Diffstat (limited to 'arch/ia64/mm/init.c')
-rw-r--r--arch/ia64/mm/init.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index d479a43d188b..beb0bcb9b78e 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -109,6 +109,7 @@ free_initmem (void)
void
free_initrd_mem (unsigned long start, unsigned long end)
{
+ struct page *page;
/*
* EFI uses 4KB pages while the kernel can use 4KB or bigger.
* Thus EFI and the kernel may have different page sizes. It is
@@ -147,11 +148,12 @@ free_initrd_mem (unsigned long start, unsigned long end)
printk(KERN_INFO "Freeing initrd memory: %ldkB freed\n", (end - start) >> 10);
for (; start < end; start += PAGE_SIZE) {
- if (!VALID_PAGE(virt_to_page(start)))
+ if (!virt_addr_valid(start))
continue;
- clear_bit(PG_reserved, &virt_to_page(start)->flags);
- set_page_count(virt_to_page(start), 1);
- free_page(start);
+ page = virt_to_page(start);
+ clear_bit(PG_reserved, &page->flags);
+ set_page_count(page, 1);
+ __free_page(page);
++totalram_pages;
}
}