Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[ARM] use asm/sections.h

Update to use the asm/sections.h header rather than declaring these
symbols ourselves. Change __data_start to _data to conform with the
naming found within asm/sections.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Russell King and committed by
Russell King
37efe642 11224303

+28 -27
+1 -1
arch/arm/kernel/head-common.S
··· 18 18 __switch_data: 19 19 .long __mmap_switched 20 20 .long __data_loc @ r4 21 - .long __data_start @ r5 21 + .long _data @ r5 22 22 .long __bss_start @ r6 23 23 .long _end @ r7 24 24 .long processor_id @ r4
+2 -2
arch/arm/kernel/module.c
··· 21 21 #include <linux/string.h> 22 22 23 23 #include <asm/pgtable.h> 24 + #include <asm/sections.h> 24 25 25 26 #ifdef CONFIG_XIP_KERNEL 26 27 /* ··· 30 29 * MODULES_VADDR is redefined here and not in asm/memory.h to avoid 31 30 * recompiling the whole kernel when CONFIG_XIP_KERNEL is turned on/off. 32 31 */ 33 - extern void _etext; 34 32 #undef MODULES_VADDR 35 - #define MODULES_VADDR (((unsigned long)&_etext + ~PGDIR_MASK) & PGDIR_MASK) 33 + #define MODULES_VADDR (((unsigned long)_etext + ~PGDIR_MASK) & PGDIR_MASK) 36 34 #endif 37 35 38 36 #ifdef CONFIG_MMU
+9 -9
arch/arm/kernel/setup.c
··· 29 29 #include <asm/cputype.h> 30 30 #include <asm/elf.h> 31 31 #include <asm/procinfo.h> 32 + #include <asm/sections.h> 32 33 #include <asm/setup.h> 33 34 #include <asm/mach-types.h> 34 35 #include <asm/cacheflush.h> ··· 62 61 63 62 extern void paging_init(struct machine_desc *desc); 64 63 extern void reboot_setup(char *str); 65 - extern void _text, _etext, __data_start, _edata, _end; 66 64 67 65 unsigned int processor_id; 68 66 EXPORT_SYMBOL(processor_id); ··· 484 484 struct resource *res; 485 485 int i; 486 486 487 - kernel_code.start = virt_to_phys(&_text); 488 - kernel_code.end = virt_to_phys(&_etext - 1); 489 - kernel_data.start = virt_to_phys(&__data_start); 490 - kernel_data.end = virt_to_phys(&_end - 1); 487 + kernel_code.start = virt_to_phys(_text); 488 + kernel_code.end = virt_to_phys(_etext - 1); 489 + kernel_data.start = virt_to_phys(_data); 490 + kernel_data.end = virt_to_phys(_end - 1); 491 491 492 492 for (i = 0; i < mi->nr_banks; i++) { 493 493 if (mi->bank[i].size == 0) ··· 715 715 parse_tags(tags); 716 716 } 717 717 718 - init_mm.start_code = (unsigned long) &_text; 719 - init_mm.end_code = (unsigned long) &_etext; 720 - init_mm.end_data = (unsigned long) &_edata; 721 - init_mm.brk = (unsigned long) &_end; 718 + init_mm.start_code = (unsigned long) _text; 719 + init_mm.end_code = (unsigned long) _etext; 720 + init_mm.end_data = (unsigned long) _edata; 721 + init_mm.brk = (unsigned long) _end; 722 722 723 723 memcpy(boot_command_line, from, COMMAND_LINE_SIZE); 724 724 boot_command_line[COMMAND_LINE_SIZE-1] = '\0';
+1 -1
arch/arm/kernel/vmlinux.lds.S
··· 119 119 #endif 120 120 121 121 .data : AT(__data_loc) { 122 - __data_start = .; /* address in memory */ 122 + _data = .; /* address in memory */ 123 123 124 124 /* 125 125 * first, the init task union, aligned
+7 -6
arch/arm/mm/init.c
··· 17 17 #include <linux/initrd.h> 18 18 19 19 #include <asm/mach-types.h> 20 + #include <asm/sections.h> 20 21 #include <asm/setup.h> 21 22 #include <asm/sizes.h> 22 23 #include <asm/tlb.h> ··· 130 129 { 131 130 unsigned int start_pfn, i, bootmap_pfn; 132 131 133 - start_pfn = PAGE_ALIGN(__pa(&_end)) >> PAGE_SHIFT; 132 + start_pfn = PAGE_ALIGN(__pa(_end)) >> PAGE_SHIFT; 134 133 bootmap_pfn = 0; 135 134 136 135 for_each_nodebank(i, mi, node) { ··· 516 515 } 517 516 printk(" = %luMB total\n", num_physpages >> (20 - PAGE_SHIFT)); 518 517 519 - codesize = &_etext - &_text; 520 - datasize = &_end - &__data_start; 521 - initsize = &__init_end - &__init_begin; 518 + codesize = _etext - _text; 519 + datasize = _end - _data; 520 + initsize = __init_end - __init_begin; 522 521 523 522 printk(KERN_NOTICE "Memory: %luKB available (%dK code, " 524 523 "%dK data, %dK init)\n", ··· 539 538 void free_initmem(void) 540 539 { 541 540 if (!machine_is_integrator() && !machine_is_cintegrator()) 542 - totalram_pages += free_area(__phys_to_pfn(__pa(&__init_begin)), 543 - __phys_to_pfn(__pa(&__init_end)), 541 + totalram_pages += free_area(__phys_to_pfn(__pa(__init_begin)), 542 + __phys_to_pfn(__pa(__init_end)), 544 543 "init"); 545 544 } 546 545
-2
arch/arm/mm/mm.h
··· 34 34 void __init create_mapping(struct map_desc *md); 35 35 void __init bootmem_init(void); 36 36 void reserve_node_zero(struct pglist_data *pgdat); 37 - 38 - extern void _text, _stext, _etext, __data_start, _end, __init_begin, __init_end;
+5 -4
arch/arm/mm/mmu.c
··· 17 17 18 18 #include <asm/cputype.h> 19 19 #include <asm/mach-types.h> 20 + #include <asm/sections.h> 20 21 #include <asm/setup.h> 21 22 #include <asm/sizes.h> 22 23 #include <asm/tlb.h> ··· 731 730 732 731 #ifdef CONFIG_XIP_KERNEL 733 732 /* The XIP kernel is mapped in the module area -- skip over it */ 734 - addr = ((unsigned long)&_etext + PGDIR_SIZE - 1) & PGDIR_MASK; 733 + addr = ((unsigned long)_etext + PGDIR_SIZE - 1) & PGDIR_MASK; 735 734 #endif 736 735 for ( ; addr < PAGE_OFFSET; addr += PGDIR_SIZE) 737 736 pmd_clear(pmd_off_k(addr)); ··· 757 756 * Note that this can only be in node 0. 758 757 */ 759 758 #ifdef CONFIG_XIP_KERNEL 760 - reserve_bootmem_node(pgdat, __pa(&__data_start), &_end - &__data_start, 759 + reserve_bootmem_node(pgdat, __pa(_data), _end - _data, 761 760 BOOTMEM_DEFAULT); 762 761 #else 763 - reserve_bootmem_node(pgdat, __pa(&_stext), &_end - &_stext, 762 + reserve_bootmem_node(pgdat, __pa(_stext), _end - _stext, 764 763 BOOTMEM_DEFAULT); 765 764 #endif 766 765 ··· 839 838 #ifdef CONFIG_XIP_KERNEL 840 839 map.pfn = __phys_to_pfn(CONFIG_XIP_PHYS_ADDR & SECTION_MASK); 841 840 map.virtual = MODULES_VADDR; 842 - map.length = ((unsigned long)&_etext - map.virtual + ~SECTION_MASK) & SECTION_MASK; 841 + map.length = ((unsigned long)_etext - map.virtual + ~SECTION_MASK) & SECTION_MASK; 843 842 map.type = MT_ROM; 844 843 create_mapping(&map); 845 844 #endif
+3 -2
arch/arm/mm/nommu.c
··· 10 10 #include <linux/io.h> 11 11 12 12 #include <asm/cacheflush.h> 13 + #include <asm/sections.h> 13 14 #include <asm/page.h> 14 15 #include <asm/mach/arch.h> 15 16 ··· 26 25 * Note that this can only be in node 0. 27 26 */ 28 27 #ifdef CONFIG_XIP_KERNEL 29 - reserve_bootmem_node(pgdat, __pa(&__data_start), &_end - &__data_start, 28 + reserve_bootmem_node(pgdat, __pa(_data), _end - _data, 30 29 BOOTMEM_DEFAULT); 31 30 #else 32 - reserve_bootmem_node(pgdat, __pa(&_stext), &_end - &_stext, 31 + reserve_bootmem_node(pgdat, __pa(_stext), _end - _stext, 33 32 BOOTMEM_DEFAULT); 34 33 #endif 35 34