diff options
-rw-r--r-- | arch/arm/kernel/head-common.S | 2 | ||||
-rw-r--r-- | arch/arm/kernel/module.c | 4 | ||||
-rw-r--r-- | arch/arm/kernel/setup.c | 18 | ||||
-rw-r--r-- | arch/arm/kernel/vmlinux.lds.S | 2 | ||||
-rw-r--r-- | arch/arm/mm/init.c | 13 | ||||
-rw-r--r-- | arch/arm/mm/mm.h | 2 | ||||
-rw-r--r-- | arch/arm/mm/mmu.c | 9 | ||||
-rw-r--r-- | arch/arm/mm/nommu.c | 5 |
8 files changed, 28 insertions, 27 deletions
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S index bde52df1c668..991952c644d1 100644 --- a/arch/arm/kernel/head-common.S +++ b/arch/arm/kernel/head-common.S | |||
@@ -18,7 +18,7 @@ | |||
18 | __switch_data: | 18 | __switch_data: |
19 | .long __mmap_switched | 19 | .long __mmap_switched |
20 | .long __data_loc @ r4 | 20 | .long __data_loc @ r4 |
21 | .long __data_start @ r5 | 21 | .long _data @ r5 |
22 | .long __bss_start @ r6 | 22 | .long __bss_start @ r6 |
23 | .long _end @ r7 | 23 | .long _end @ r7 |
24 | .long processor_id @ r4 | 24 | .long processor_id @ r4 |
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index b8d965dcd6fd..dab48f27263f 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/string.h> | 21 | #include <linux/string.h> |
22 | 22 | ||
23 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
24 | #include <asm/sections.h> | ||
24 | 25 | ||
25 | #ifdef CONFIG_XIP_KERNEL | 26 | #ifdef CONFIG_XIP_KERNEL |
26 | /* | 27 | /* |
@@ -29,9 +30,8 @@ | |||
29 | * MODULES_VADDR is redefined here and not in asm/memory.h to avoid | 30 | * MODULES_VADDR is redefined here and not in asm/memory.h to avoid |
30 | * recompiling the whole kernel when CONFIG_XIP_KERNEL is turned on/off. | 31 | * recompiling the whole kernel when CONFIG_XIP_KERNEL is turned on/off. |
31 | */ | 32 | */ |
32 | extern void _etext; | ||
33 | #undef MODULES_VADDR | 33 | #undef MODULES_VADDR |
34 | #define MODULES_VADDR (((unsigned long)&_etext + ~PGDIR_MASK) & PGDIR_MASK) | 34 | #define MODULES_VADDR (((unsigned long)_etext + ~PGDIR_MASK) & PGDIR_MASK) |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #ifdef CONFIG_MMU | 37 | #ifdef CONFIG_MMU |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 4f6ae06d0855..7049815d66d5 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/cputype.h> | 29 | #include <asm/cputype.h> |
30 | #include <asm/elf.h> | 30 | #include <asm/elf.h> |
31 | #include <asm/procinfo.h> | 31 | #include <asm/procinfo.h> |
32 | #include <asm/sections.h> | ||
32 | #include <asm/setup.h> | 33 | #include <asm/setup.h> |
33 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
34 | #include <asm/cacheflush.h> | 35 | #include <asm/cacheflush.h> |
@@ -61,7 +62,6 @@ __setup("fpe=", fpe_setup); | |||
61 | 62 | ||
62 | extern void paging_init(struct machine_desc *desc); | 63 | extern void paging_init(struct machine_desc *desc); |
63 | extern void reboot_setup(char *str); | 64 | extern void reboot_setup(char *str); |
64 | extern void _text, _etext, __data_start, _edata, _end; | ||
65 | 65 | ||
66 | unsigned int processor_id; | 66 | unsigned int processor_id; |
67 | EXPORT_SYMBOL(processor_id); | 67 | EXPORT_SYMBOL(processor_id); |
@@ -484,10 +484,10 @@ request_standard_resources(struct meminfo *mi, struct machine_desc *mdesc) | |||
484 | struct resource *res; | 484 | struct resource *res; |
485 | int i; | 485 | int i; |
486 | 486 | ||
487 | kernel_code.start = virt_to_phys(&_text); | 487 | kernel_code.start = virt_to_phys(_text); |
488 | kernel_code.end = virt_to_phys(&_etext - 1); | 488 | kernel_code.end = virt_to_phys(_etext - 1); |
489 | kernel_data.start = virt_to_phys(&__data_start); | 489 | kernel_data.start = virt_to_phys(_data); |
490 | kernel_data.end = virt_to_phys(&_end - 1); | 490 | kernel_data.end = virt_to_phys(_end - 1); |
491 | 491 | ||
492 | for (i = 0; i < mi->nr_banks; i++) { | 492 | for (i = 0; i < mi->nr_banks; i++) { |
493 | if (mi->bank[i].size == 0) | 493 | if (mi->bank[i].size == 0) |
@@ -715,10 +715,10 @@ void __init setup_arch(char **cmdline_p) | |||
715 | parse_tags(tags); | 715 | parse_tags(tags); |
716 | } | 716 | } |
717 | 717 | ||
718 | init_mm.start_code = (unsigned long) &_text; | 718 | init_mm.start_code = (unsigned long) _text; |
719 | init_mm.end_code = (unsigned long) &_etext; | 719 | init_mm.end_code = (unsigned long) _etext; |
720 | init_mm.end_data = (unsigned long) &_edata; | 720 | init_mm.end_data = (unsigned long) _edata; |
721 | init_mm.brk = (unsigned long) &_end; | 721 | init_mm.brk = (unsigned long) _end; |
722 | 722 | ||
723 | memcpy(boot_command_line, from, COMMAND_LINE_SIZE); | 723 | memcpy(boot_command_line, from, COMMAND_LINE_SIZE); |
724 | boot_command_line[COMMAND_LINE_SIZE-1] = '\0'; | 724 | boot_command_line[COMMAND_LINE_SIZE-1] = '\0'; |
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 4898bdcfe7dd..00216071eaf7 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -119,7 +119,7 @@ SECTIONS | |||
119 | #endif | 119 | #endif |
120 | 120 | ||
121 | .data : AT(__data_loc) { | 121 | .data : AT(__data_loc) { |
122 | __data_start = .; /* address in memory */ | 122 | _data = .; /* address in memory */ |
123 | 123 | ||
124 | /* | 124 | /* |
125 | * first, the init task union, aligned | 125 | * first, the init task union, aligned |
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) | |||
538 | void free_initmem(void) | 539 | void 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; | |||
34 | void __init create_mapping(struct map_desc *md); | 34 | void __init create_mapping(struct map_desc *md); |
35 | void __init bootmem_init(void); | 35 | void __init bootmem_init(void); |
36 | void reserve_node_zero(struct pglist_data *pgdat); | 36 | void reserve_node_zero(struct pglist_data *pgdat); |
37 | |||
38 | extern 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 | ||