summaryrefslogtreecommitdiff
path: root/mm/page_alloc.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 /mm/page_alloc.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 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b0a264628f69..f4600396fcd6 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -101,8 +101,6 @@ static void __free_pages_ok (struct page *page, unsigned int order)
BUG();
if (page->mapping)
BUG();
- if (!VALID_PAGE(page))
- BUG();
if (PageLocked(page))
BUG();
if (PageLRU(page))
@@ -295,8 +293,6 @@ static struct page * balance_classzone(zone_t * classzone, unsigned int gfp_mask
BUG();
if (page->mapping)
BUG();
- if (!VALID_PAGE(page))
- BUG();
if (PageLocked(page))
BUG();
if (PageLRU(page))
@@ -477,8 +473,10 @@ void __free_pages(struct page *page, unsigned int order)
void free_pages(unsigned long addr, unsigned int order)
{
- if (addr != 0)
+ if (addr != 0) {
+ BUG_ON(!virt_addr_valid(addr));
__free_pages(virt_to_page(addr), order);
+ }
}
/*