aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorJiang Liu <liuj97@gmail.com>2013-04-29 18:07:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 18:54:32 -0400
commit32e1a109276e96f4caec97305167260522476e4a (patch)
tree0524bb979cfca808cc790c557256fe5ec5aedda3 /arch/sparc
parent7db6f78cfe683cb8ce508d6cecdfc6638ac35a3f (diff)
mm/SPARC: use free_highmem_page() to free highmem pages into buddy system
Use helper function free_highmem_page() to free highmem pages into the buddy system. Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Cc: "David S. Miller" <davem@davemloft.net> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/mm/init_32.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c
index 48e0c030e8f5..4490c397bb5b 100644
--- a/arch/sparc/mm/init_32.c
+++ b/arch/sparc/mm/init_32.c
@@ -282,14 +282,8 @@ static void map_high_region(unsigned long start_pfn, unsigned long end_pfn)
282 printk("mapping high region %08lx - %08lx\n", start_pfn, end_pfn); 282 printk("mapping high region %08lx - %08lx\n", start_pfn, end_pfn);
283#endif 283#endif
284 284
285 for (tmp = start_pfn; tmp < end_pfn; tmp++) { 285 for (tmp = start_pfn; tmp < end_pfn; tmp++)
286 struct page *page = pfn_to_page(tmp); 286 free_highmem_page(pfn_to_page(tmp));
287
288 ClearPageReserved(page);
289 init_page_count(page);
290 __free_page(page);
291 totalhigh_pages++;
292 }
293} 287}
294 288
295void __init mem_init(void) 289void __init mem_init(void)
@@ -347,8 +341,6 @@ void __init mem_init(void)
347 map_high_region(start_pfn, end_pfn); 341 map_high_region(start_pfn, end_pfn);
348 } 342 }
349 343
350 totalram_pages += totalhigh_pages;
351
352 codepages = (((unsigned long) &_etext) - ((unsigned long)&_start)); 344 codepages = (((unsigned long) &_etext) - ((unsigned long)&_start));
353 codepages = PAGE_ALIGN(codepages) >> PAGE_SHIFT; 345 codepages = PAGE_ALIGN(codepages) >> PAGE_SHIFT;
354 datapages = (((unsigned long) &_edata) - ((unsigned long)&_etext)); 346 datapages = (((unsigned long) &_edata) - ((unsigned long)&_etext));