aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/init.c13
-rw-r--r--arch/arm/mm/mm.h2
-rw-r--r--arch/arm/mm/mmu.c9
-rw-r--r--arch/arm/mm/nommu.c5
4 files changed, 15 insertions, 14 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index ab5c9abd5c34..34df4d9d03a6 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -17,6 +17,7 @@
17#include <linux/initrd.h> 17#include <linux/initrd.h>
18 18
19#include <asm/mach-types.h> 19#include <asm/mach-types.h>
20#include <asm/sections.h>
20#include <asm/setup.h> 21#include <asm/setup.h>
21#include <asm/sizes.h> 22#include <asm/sizes.h>
22#include <asm/tlb.h> 23#include <asm/tlb.h>
@@ -129,7 +130,7 @@ find_bootmap_pfn(int node, struct meminfo *mi, unsigned int bootmap_pages)
129{ 130{
130 unsigned int start_pfn, i, bootmap_pfn; 131 unsigned int start_pfn, i, bootmap_pfn;
131 132
132 start_pfn = PAGE_ALIGN(__pa(&_end)) >> PAGE_SHIFT; 133 start_pfn = PAGE_ALIGN(__pa(_end)) >> PAGE_SHIFT;
133 bootmap_pfn = 0; 134 bootmap_pfn = 0;
134 135
135 for_each_nodebank(i, mi, node) { 136 for_each_nodebank(i, mi, node) {
@@ -515,9 +516,9 @@ void __init mem_init(void)
515 } 516 }
516 printk(" = %luMB total\n", num_physpages >> (20 - PAGE_SHIFT)); 517 printk(" = %luMB total\n", num_physpages >> (20 - PAGE_SHIFT));
517 518
518 codesize = &_etext - &_text; 519 codesize = _etext - _text;
519 datasize = &_end - &__data_start; 520 datasize = _end - _data;
520 initsize = &__init_end - &__init_begin; 521 initsize = __init_end - __init_begin;
521 522
522 printk(KERN_NOTICE "Memory: %luKB available (%dK code, " 523 printk(KERN_NOTICE "Memory: %luKB available (%dK code, "
523 "%dK data, %dK init)\n", 524 "%dK data, %dK init)\n",
@@ -538,8 +539,8 @@ void __init mem_init(void)
538void free_initmem(void) 539void free_initmem(void)
539{ 540{
540 if (!machine_is_integrator() && !machine_is_cintegrator()) 541 if (!machine_is_integrator() && !machine_is_cintegrator())
541 totalram_pages += free_area(__phys_to_pfn(__pa(&__init_begin)), 542 totalram_pages += free_area(__phys_to_pfn(__pa(__init_begin)),
542 __phys_to_pfn(__pa(&__init_end)), 543 __phys_to_pfn(__pa(__init_end)),
543 "init"); 544 "init");
544} 545}
545 546
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h
index 94367bdbb5a8..95bbe112965e 100644
--- a/arch/arm/mm/mm.h
+++ b/arch/arm/mm/mm.h
@@ -34,5 +34,3 @@ struct pglist_data;
34void __init create_mapping(struct map_desc *md); 34void __init create_mapping(struct map_desc *md);
35void __init bootmem_init(void); 35void __init bootmem_init(void);
36void reserve_node_zero(struct pglist_data *pgdat); 36void reserve_node_zero(struct pglist_data *pgdat);
37
38extern void _text, _stext, _etext, __data_start, _end, __init_begin, __init_end;
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index c0b9a78d7b87..2ab5f962a053 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -17,6 +17,7 @@
17 17
18#include <asm/cputype.h> 18#include <asm/cputype.h>
19#include <asm/mach-types.h> 19#include <asm/mach-types.h>
20#include <asm/sections.h>
20#include <asm/setup.h> 21#include <asm/setup.h>
21#include <asm/sizes.h> 22#include <asm/sizes.h>
22#include <asm/tlb.h> 23#include <asm/tlb.h>
@@ -730,7 +731,7 @@ static inline void prepare_page_table(void)
730 731
731#ifdef CONFIG_XIP_KERNEL 732#ifdef CONFIG_XIP_KERNEL
732 /* The XIP kernel is mapped in the module area -- skip over it */ 733 /* The XIP kernel is mapped in the module area -- skip over it */
733 addr = ((unsigned long)&_etext + PGDIR_SIZE - 1) & PGDIR_MASK; 734 addr = ((unsigned long)_etext + PGDIR_SIZE - 1) & PGDIR_MASK;
734#endif 735#endif
735 for ( ; addr < PAGE_OFFSET; addr += PGDIR_SIZE) 736 for ( ; addr < PAGE_OFFSET; addr += PGDIR_SIZE)
736 pmd_clear(pmd_off_k(addr)); 737 pmd_clear(pmd_off_k(addr));
@@ -756,10 +757,10 @@ void __init reserve_node_zero(pg_data_t *pgdat)
756 * Note that this can only be in node 0. 757 * Note that this can only be in node 0.
757 */ 758 */
758#ifdef CONFIG_XIP_KERNEL 759#ifdef CONFIG_XIP_KERNEL
759 reserve_bootmem_node(pgdat, __pa(&__data_start), &_end - &__data_start, 760 reserve_bootmem_node(pgdat, __pa(_data), _end - _data,
760 BOOTMEM_DEFAULT); 761 BOOTMEM_DEFAULT);
761#else 762#else
762 reserve_bootmem_node(pgdat, __pa(&_stext), &_end - &_stext, 763 reserve_bootmem_node(pgdat, __pa(_stext), _end - _stext,
763 BOOTMEM_DEFAULT); 764 BOOTMEM_DEFAULT);
764#endif 765#endif
765 766
@@ -838,7 +839,7 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
838#ifdef CONFIG_XIP_KERNEL 839#ifdef CONFIG_XIP_KERNEL
839 map.pfn = __phys_to_pfn(CONFIG_XIP_PHYS_ADDR & SECTION_MASK); 840 map.pfn = __phys_to_pfn(CONFIG_XIP_PHYS_ADDR & SECTION_MASK);
840 map.virtual = MODULES_VADDR; 841 map.virtual = MODULES_VADDR;
841 map.length = ((unsigned long)&_etext - map.virtual + ~SECTION_MASK) & SECTION_MASK; 842 map.length = ((unsigned long)_etext - map.virtual + ~SECTION_MASK) & SECTION_MASK;
842 map.type = MT_ROM; 843 map.type = MT_ROM;
843 create_mapping(&map); 844 create_mapping(&map);
844#endif 845#endif
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c
index c085f4e8248b..ad7bacc693b2 100644
--- a/arch/arm/mm/nommu.c
+++ b/arch/arm/mm/nommu.c
@@ -10,6 +10,7 @@
10#include <linux/io.h> 10#include <linux/io.h>
11 11
12#include <asm/cacheflush.h> 12#include <asm/cacheflush.h>
13#include <asm/sections.h>
13#include <asm/page.h> 14#include <asm/page.h>
14#include <asm/mach/arch.h> 15#include <asm/mach/arch.h>
15 16
@@ -25,10 +26,10 @@ void __init reserve_node_zero(pg_data_t *pgdat)
25 * Note that this can only be in node 0. 26 * Note that this can only be in node 0.
26 */ 27 */
27#ifdef CONFIG_XIP_KERNEL 28#ifdef CONFIG_XIP_KERNEL
28 reserve_bootmem_node(pgdat, __pa(&__data_start), &_end - &__data_start, 29 reserve_bootmem_node(pgdat, __pa(_data), _end - _data,
29 BOOTMEM_DEFAULT); 30 BOOTMEM_DEFAULT);
30#else 31#else
31 reserve_bootmem_node(pgdat, __pa(&_stext), &_end - &_stext, 32 reserve_bootmem_node(pgdat, __pa(_stext), _end - _stext,
32 BOOTMEM_DEFAULT); 33 BOOTMEM_DEFAULT);
33#endif 34#endif
34 35