aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/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/ppc/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/ppc/mm')
-rw-r--r--arch/ppc/mm/init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c
index 134db5c04203..cb1c294fb932 100644
--- a/arch/ppc/mm/init.c
+++ b/arch/ppc/mm/init.c
@@ -140,7 +140,7 @@ static void free_sec(unsigned long start, unsigned long end, const char *name)
140 140
141 while (start < end) { 141 while (start < end) {
142 ClearPageReserved(virt_to_page(start)); 142 ClearPageReserved(virt_to_page(start));
143 set_page_count(virt_to_page(start), 1); 143 init_page_count(virt_to_page(start));
144 free_page(start); 144 free_page(start);
145 cnt++; 145 cnt++;
146 start += PAGE_SIZE; 146 start += PAGE_SIZE;
@@ -172,7 +172,7 @@ void free_initrd_mem(unsigned long start, unsigned long end)
172 172
173 for (; start < end; start += PAGE_SIZE) { 173 for (; start < end; start += PAGE_SIZE) {
174 ClearPageReserved(virt_to_page(start)); 174 ClearPageReserved(virt_to_page(start));
175 set_page_count(virt_to_page(start), 1); 175 init_page_count(virt_to_page(start));
176 free_page(start); 176 free_page(start);
177 totalram_pages++; 177 totalram_pages++;
178 } 178 }
@@ -441,7 +441,7 @@ void __init mem_init(void)
441 struct page *page = mem_map + pfn; 441 struct page *page = mem_map + pfn;
442 442
443 ClearPageReserved(page); 443 ClearPageReserved(page);
444 set_page_count(page, 1); 444 init_page_count(page);
445 __free_page(page); 445 __free_page(page);
446 totalhigh_pages++; 446 totalhigh_pages++;
447 } 447 }