aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2006-03-22 03:08:40 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 10:54:02 -0500
commit7835e98b2e3c66dba79cb0ff8ebb90a2fe030c29 (patch)
tree405a96eade34845dabe2f125b6c5eb095846869d /arch/sparc/mm
parent70dc991d66cac40fdb07346dba2b5d862d732c34 (diff)
[PATCH] remove set_page_count() outside mm/
set_page_count usage outside mm/ is limited to setting the refcount to 1. Remove set_page_count from outside mm/, and replace those users with init_page_count() and set_page_refcounted(). This allows more debug checking, and tighter control on how code is allowed to play around with page->_count. Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r--arch/sparc/mm/init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c
index c03babaa0498..898669732466 100644
--- a/arch/sparc/mm/init.c
+++ b/arch/sparc/mm/init.c
@@ -383,7 +383,7 @@ void map_high_region(unsigned long start_pfn, unsigned long end_pfn)
383 struct page *page = pfn_to_page(tmp); 383 struct page *page = pfn_to_page(tmp);
384 384
385 ClearPageReserved(page); 385 ClearPageReserved(page);
386 set_page_count(page, 1); 386 init_page_count(page);
387 __free_page(page); 387 __free_page(page);
388 totalhigh_pages++; 388 totalhigh_pages++;
389 } 389 }
@@ -480,7 +480,7 @@ void free_initmem (void)
480 p = virt_to_page(addr); 480 p = virt_to_page(addr);
481 481
482 ClearPageReserved(p); 482 ClearPageReserved(p);
483 set_page_count(p, 1); 483 init_page_count(p);
484 __free_page(p); 484 __free_page(p);
485 totalram_pages++; 485 totalram_pages++;
486 num_physpages++; 486 num_physpages++;
@@ -497,7 +497,7 @@ void free_initrd_mem(unsigned long start, unsigned long end)
497 struct page *p = virt_to_page(start); 497 struct page *p = virt_to_page(start);
498 498
499 ClearPageReserved(p); 499 ClearPageReserved(p);
500 set_page_count(p, 1); 500 init_page_count(p);
501 __free_page(p); 501 __free_page(p);
502 num_physpages++; 502 num_physpages++;
503 } 503 }