diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2008-12-27 00:35:12 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-27 00:35:12 -0800 |
commit | 86ed40bd6fe511d26bb8f3fa65a84cb65c235366 (patch) | |
tree | 12ec939078887d6f5bc437cfd8ac34eff610c715 /arch/sparc/mm/init_32.c | |
parent | b74e34dbdeb39136e0557930a373392b7d644f43 (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.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c index 677c1e187a23..fec926021f49 100644 --- a/arch/sparc/mm/init_32.c +++ b/arch/sparc/mm/init_32.c @@ -25,6 +25,7 @@ #include <linux/pagemap.h> #include <linux/poison.h> +#include <asm/sections.h> #include <asm/system.h> #include <asm/vac-ops.h> #include <asm/page.h> @@ -48,9 +49,6 @@ unsigned long sparc_unmapped_base; struct pgtable_cache_struct pgt_quicklists; -/* References to section boundaries */ -extern char __init_begin, __init_end, _start, _end, etext , edata; - /* Initial ramdisk setup */ extern unsigned int sparc_ramdisk_image; extern unsigned int sparc_ramdisk_size; @@ -450,9 +448,9 @@ void __init mem_init(void) totalram_pages += totalhigh_pages; - codepages = (((unsigned long) &etext) - ((unsigned long)&_start)); + codepages = (((unsigned long) &_etext) - ((unsigned long)&_start)); codepages = PAGE_ALIGN(codepages) >> PAGE_SHIFT; - datapages = (((unsigned long) &edata) - ((unsigned long)&etext)); + datapages = (((unsigned long) &_edata) - ((unsigned long)&_etext)); datapages = PAGE_ALIGN(datapages) >> PAGE_SHIFT; initpages = (((unsigned long) &__init_end) - ((unsigned long) &__init_begin)); initpages = PAGE_ALIGN(initpages) >> PAGE_SHIFT; @@ -476,8 +474,10 @@ void __init mem_init(void) void free_initmem (void) { unsigned long addr; + unsigned long freed; addr = (unsigned long)(&__init_begin); + freed = (unsigned long)(&__init_end) - addr; for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) { struct page *p; @@ -490,8 +490,8 @@ void free_initmem (void) totalram_pages++; num_physpages++; } - printk(KERN_INFO "Freeing unused kernel memory: %dk freed\n", - (&__init_end - &__init_begin) >> 10); + printk(KERN_INFO "Freeing unused kernel memory: %ldk freed\n", + freed >> 10); } #ifdef CONFIG_BLK_DEV_INITRD |