aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm
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
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')
-rw-r--r--arch/sparc/mm/init_32.c14
-rw-r--r--arch/sparc/mm/sun4c.c4
2 files changed, 9 insertions, 9 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 @@
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
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c
index ad0ce117f352..2ffacd67c424 100644
--- a/arch/sparc/mm/sun4c.c
+++ b/arch/sparc/mm/sun4c.c
@@ -18,6 +18,7 @@
18#include <linux/seq_file.h> 18#include <linux/seq_file.h>
19#include <linux/scatterlist.h> 19#include <linux/scatterlist.h>
20 20
21#include <asm/sections.h>
21#include <asm/page.h> 22#include <asm/page.h>
22#include <asm/pgalloc.h> 23#include <asm/pgalloc.h>
23#include <asm/pgtable.h> 24#include <asm/pgtable.h>
@@ -1951,7 +1952,6 @@ void sun4c_update_mmu_cache(struct vm_area_struct *vma, unsigned long address, p
1951} 1952}
1952 1953
1953extern void sparc_context_init(int); 1954extern void sparc_context_init(int);
1954extern unsigned long end;
1955extern unsigned long bootmem_init(unsigned long *pages_avail); 1955extern unsigned long bootmem_init(unsigned long *pages_avail);
1956extern unsigned long last_valid_pfn; 1956extern unsigned long last_valid_pfn;
1957 1957
@@ -1962,7 +1962,7 @@ void __init sun4c_paging_init(void)
1962 extern struct resource sparc_iomap; 1962 extern struct resource sparc_iomap;
1963 unsigned long end_pfn, pages_avail; 1963 unsigned long end_pfn, pages_avail;
1964 1964
1965 kernel_end = (unsigned long) &end; 1965 kernel_end = (unsigned long) &_end;
1966 kernel_end = SUN4C_REAL_PGDIR_ALIGN(kernel_end); 1966 kernel_end = SUN4C_REAL_PGDIR_ALIGN(kernel_end);
1967 1967
1968 pages_avail = 0; 1968 pages_avail = 0;