Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37efe642 authored by Russell King's avatar Russell King Committed by Russell King
Browse files

[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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 11224303
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -18,7 +18,7 @@
__switch_data:
__switch_data:
	.long	__mmap_switched
	.long	__mmap_switched
	.long	__data_loc			@ r4
	.long	__data_loc			@ r4
	.long	__data_start			@ r5
	.long	_data				@ r5
	.long	__bss_start			@ r6
	.long	__bss_start			@ r6
	.long	_end				@ r7
	.long	_end				@ r7
	.long	processor_id			@ r4
	.long	processor_id			@ r4
+2 −2
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@
#include <linux/string.h>
#include <linux/string.h>


#include <asm/pgtable.h>
#include <asm/pgtable.h>
#include <asm/sections.h>


#ifdef CONFIG_XIP_KERNEL
#ifdef CONFIG_XIP_KERNEL
/*
/*
@@ -29,9 +30,8 @@
 * MODULES_VADDR is redefined here and not in asm/memory.h to avoid
 * MODULES_VADDR is redefined here and not in asm/memory.h to avoid
 * recompiling the whole kernel when CONFIG_XIP_KERNEL is turned on/off.
 * recompiling the whole kernel when CONFIG_XIP_KERNEL is turned on/off.
 */
 */
extern void _etext;
#undef MODULES_VADDR
#undef MODULES_VADDR
#define MODULES_VADDR	(((unsigned long)&_etext + ~PGDIR_MASK) & PGDIR_MASK)
#define MODULES_VADDR	(((unsigned long)_etext + ~PGDIR_MASK) & PGDIR_MASK)
#endif
#endif


#ifdef CONFIG_MMU
#ifdef CONFIG_MMU
+9 −9
Original line number Original line Diff line number Diff line
@@ -29,6 +29,7 @@
#include <asm/cputype.h>
#include <asm/cputype.h>
#include <asm/elf.h>
#include <asm/elf.h>
#include <asm/procinfo.h>
#include <asm/procinfo.h>
#include <asm/sections.h>
#include <asm/setup.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
#include <asm/mach-types.h>
#include <asm/cacheflush.h>
#include <asm/cacheflush.h>
@@ -61,7 +62,6 @@ __setup("fpe=", fpe_setup);


extern void paging_init(struct machine_desc *desc);
extern void paging_init(struct machine_desc *desc);
extern void reboot_setup(char *str);
extern void reboot_setup(char *str);
extern void _text, _etext, __data_start, _edata, _end;


unsigned int processor_id;
unsigned int processor_id;
EXPORT_SYMBOL(processor_id);
EXPORT_SYMBOL(processor_id);
@@ -484,10 +484,10 @@ request_standard_resources(struct meminfo *mi, struct machine_desc *mdesc)
	struct resource *res;
	struct resource *res;
	int i;
	int i;


	kernel_code.start   = virt_to_phys(&_text);
	kernel_code.start   = virt_to_phys(_text);
	kernel_code.end     = virt_to_phys(&_etext - 1);
	kernel_code.end     = virt_to_phys(_etext - 1);
	kernel_data.start   = virt_to_phys(&__data_start);
	kernel_data.start   = virt_to_phys(_data);
	kernel_data.end     = virt_to_phys(&_end - 1);
	kernel_data.end     = virt_to_phys(_end - 1);


	for (i = 0; i < mi->nr_banks; i++) {
	for (i = 0; i < mi->nr_banks; i++) {
		if (mi->bank[i].size == 0)
		if (mi->bank[i].size == 0)
@@ -715,10 +715,10 @@ void __init setup_arch(char **cmdline_p)
		parse_tags(tags);
		parse_tags(tags);
	}
	}


	init_mm.start_code = (unsigned long) &_text;
	init_mm.start_code = (unsigned long) _text;
	init_mm.end_code   = (unsigned long) &_etext;
	init_mm.end_code   = (unsigned long) _etext;
	init_mm.end_data   = (unsigned long) &_edata;
	init_mm.end_data   = (unsigned long) _edata;
	init_mm.brk	   = (unsigned long) &_end;
	init_mm.brk	   = (unsigned long) _end;


	memcpy(boot_command_line, from, COMMAND_LINE_SIZE);
	memcpy(boot_command_line, from, COMMAND_LINE_SIZE);
	boot_command_line[COMMAND_LINE_SIZE-1] = '\0';
	boot_command_line[COMMAND_LINE_SIZE-1] = '\0';
+1 −1
Original line number Original line Diff line number Diff line
@@ -119,7 +119,7 @@ SECTIONS
#endif
#endif


	.data : AT(__data_loc) {
	.data : AT(__data_loc) {
		__data_start = .;	/* address in memory */
		_data = .;		/* address in memory */


		/*
		/*
		 * first, the init task union, aligned
		 * first, the init task union, aligned
+7 −6
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@
#include <linux/initrd.h>
#include <linux/initrd.h>


#include <asm/mach-types.h>
#include <asm/mach-types.h>
#include <asm/sections.h>
#include <asm/setup.h>
#include <asm/setup.h>
#include <asm/sizes.h>
#include <asm/sizes.h>
#include <asm/tlb.h>
#include <asm/tlb.h>
@@ -129,7 +130,7 @@ find_bootmap_pfn(int node, struct meminfo *mi, unsigned int bootmap_pages)
{
{
	unsigned int start_pfn, i, bootmap_pfn;
	unsigned int start_pfn, i, bootmap_pfn;


	start_pfn   = PAGE_ALIGN(__pa(&_end)) >> PAGE_SHIFT;
	start_pfn   = PAGE_ALIGN(__pa(_end)) >> PAGE_SHIFT;
	bootmap_pfn = 0;
	bootmap_pfn = 0;


	for_each_nodebank(i, mi, node) {
	for_each_nodebank(i, mi, node) {
@@ -515,9 +516,9 @@ void __init mem_init(void)
	}
	}
	printk(" = %luMB total\n", num_physpages >> (20 - PAGE_SHIFT));
	printk(" = %luMB total\n", num_physpages >> (20 - PAGE_SHIFT));


	codesize = &_etext - &_text;
	codesize = _etext - _text;
	datasize = &_end - &__data_start;
	datasize = _end - _data;
	initsize = &__init_end - &__init_begin;
	initsize = __init_end - __init_begin;


	printk(KERN_NOTICE "Memory: %luKB available (%dK code, "
	printk(KERN_NOTICE "Memory: %luKB available (%dK code, "
		"%dK data, %dK init)\n",
		"%dK data, %dK init)\n",
@@ -538,8 +539,8 @@ void __init mem_init(void)
void free_initmem(void)
void free_initmem(void)
{
{
	if (!machine_is_integrator() && !machine_is_cintegrator())
	if (!machine_is_integrator() && !machine_is_cintegrator())
		totalram_pages += free_area(__phys_to_pfn(__pa(&__init_begin)),
		totalram_pages += free_area(__phys_to_pfn(__pa(__init_begin)),
					    __phys_to_pfn(__pa(&__init_end)),
					    __phys_to_pfn(__pa(__init_end)),
					    "init");
					    "init");
}
}


Loading