aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm/init_32.c
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2008-12-27 03:35:12 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-27 03:35:12 -0500
commit86ed40bd6fe511d26bb8f3fa65a84cb65c235366 (patch)
tree12ec939078887d6f5bc437cfd8ac34eff610c715 /arch/sparc/mm/init_32.c
parentb74e34dbdeb39136e0557930a373392b7d644f43 (diff)
sparc: unify sections.h
While doing this use standard names for start/end so we could use definitions straight from asm-generic for all the typical symbols. This also allowed us to drop the use of PROVIDE in the linker script so sprc is less non-standard on this area. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm/init_32.c')
-rw-r--r--arch/sparc/mm/init_32.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c
index 677c1e187a2..fec926021f4 100644
--- a/arch/sparc/mm/init_32.c
+++ b/arch/sparc/mm/init_32.c
@@ -25,6 +25,7 @@
25#include <linux/pagemap.h> 25#include <linux/pagemap.h>
26#include <linux/poison.h> 26#include <linux/poison.h>
27 27
28#include <asm/sections.h>
28#include <asm/system.h> 29#include <asm/system.h>
29#include <asm/vac-ops.h> 30#include <asm/vac-ops.h>
30#include <asm/page.h> 31#include <asm/page.h>
@@ -48,9 +49,6 @@ unsigned long sparc_unmapped_base;
48 49
49struct pgtable_cache_struct pgt_quicklists; 50struct pgtable_cache_struct pgt_quicklists;
50 51
51/* References to section boundaries */
52extern char __init_begin, __init_end, _start, _end, etext , edata;
53
54/* Initial ramdisk setup */ 52/* Initial ramdisk setup */
55extern unsigned int sparc_ramdisk_image; 53extern unsigned int sparc_ramdisk_image;
56extern unsigned int sparc_ramdisk_size; 54extern unsigned int sparc_ramdisk_size;
@@ -450,9 +448,9 @@ void __init mem_init(void)
450 448
451 totalram_pages += totalhigh_pages; 449 totalram_pages += totalhigh_pages;
452 450
453 codepages = (((unsigned long) &etext) - ((unsigned long)&_start)); 451 codepages = (((unsigned long) &_etext) - ((unsigned long)&_start));
454 codepages = PAGE_ALIGN(codepages) >> PAGE_SHIFT; 452 codepages = PAGE_ALIGN(codepages) >> PAGE_SHIFT;
455 datapages = (((unsigned long) &edata) - ((unsigned long)&etext)); 453 datapages = (((unsigned long) &_edata) - ((unsigned long)&_etext));
456 datapages = PAGE_ALIGN(datapages) >> PAGE_SHIFT; 454 datapages = PAGE_ALIGN(datapages) >> PAGE_SHIFT;
457 initpages = (((unsigned long) &__init_end) - ((unsigned long) &__init_begin)); 455 initpages = (((unsigned long) &__init_end) - ((unsigned long) &__init_begin));
458 initpages = PAGE_ALIGN(initpages) >> PAGE_SHIFT; 456 initpages = PAGE_ALIGN(initpages) >> PAGE_SHIFT;
@@ -476,8 +474,10 @@ void __init mem_init(void)
476void free_initmem (void) 474void free_initmem (void)
477{ 475{
478 unsigned long addr; 476 unsigned long addr;
477 unsigned long freed;
479 478
480 addr = (unsigned long)(&__init_begin); 479 addr = (unsigned long)(&__init_begin);
480 freed = (unsigned long)(&__init_end) - addr;
481 for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { 481 for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) {
482 struct page *p; 482 struct page *p;
483 483
@@ -490,8 +490,8 @@ void free_initmem (void)
490 totalram_pages++; 490 totalram_pages++;
491 num_physpages++; 491 num_physpages++;
492 } 492 }
493 printk(KERN_INFO "Freeing unused kernel memory: %dk freed\n", 493 printk(KERN_INFO "Freeing unused kernel memory: %ldk freed\n",
494 (&__init_end - &__init_begin) >> 10); 494 freed >> 10);
495} 495}
496 496
497#ifdef CONFIG_BLK_DEV_INITRD 497#ifdef CONFIG_BLK_DEV_INITRD