diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2012-05-31 16:39:21 -0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2012-06-27 03:59:43 -0400 |
commit | 363737d66427c18edb321a06933ac999d9ce5d7f (patch) | |
tree | 6004bda0a098ccd8292790c2cfb8e28c635545b8 /arch/sh | |
parent | dfe1d26d4a90287ede6b5376967375e1f8af3434 (diff) |
mtd/uclinux: Use generic __bss_stop instead of _ebss
The standard (see BSS_SECTION() in <asm-generic/vmlinux.lds.h> and
<asm-generic/sections.h>) symbol for the end of BSS is __bss_stop.
This allows to remove all local declarations that have been added to
several architectures just to please CONFIG_MTD_UCLINUX.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Michal Simek <monstr@monstr.eu>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/include/asm/sections.h | 1 | ||||
-rw-r--r-- | arch/sh/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/sh_ksyms_32.c | 1 | ||||
-rw-r--r-- | arch/sh/kernel/vmlinux.lds.S | 1 | ||||
-rw-r--r-- | arch/sh/lib/mcount.S | 8 |
5 files changed, 4 insertions, 9 deletions
diff --git a/arch/sh/include/asm/sections.h b/arch/sh/include/asm/sections.h index 4a5350037c8f..1b6199740e98 100644 --- a/arch/sh/include/asm/sections.h +++ b/arch/sh/include/asm/sections.h | |||
@@ -6,7 +6,6 @@ | |||
6 | extern long __nosave_begin, __nosave_end; | 6 | extern long __nosave_begin, __nosave_end; |
7 | extern long __machvec_start, __machvec_end; | 7 | extern long __machvec_start, __machvec_end; |
8 | extern char __uncached_start, __uncached_end; | 8 | extern char __uncached_start, __uncached_end; |
9 | extern char _ebss[]; | ||
10 | extern char __start_eh_frame[], __stop_eh_frame[]; | 9 | extern char __start_eh_frame[], __stop_eh_frame[]; |
11 | 10 | ||
12 | #endif /* __ASM_SH_SECTIONS_H */ | 11 | #endif /* __ASM_SH_SECTIONS_H */ |
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 7b57bf1dc855..ebe7a7d97215 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -273,7 +273,7 @@ void __init setup_arch(char **cmdline_p) | |||
273 | data_resource.start = virt_to_phys(_etext); | 273 | data_resource.start = virt_to_phys(_etext); |
274 | data_resource.end = virt_to_phys(_edata)-1; | 274 | data_resource.end = virt_to_phys(_edata)-1; |
275 | bss_resource.start = virt_to_phys(__bss_start); | 275 | bss_resource.start = virt_to_phys(__bss_start); |
276 | bss_resource.end = virt_to_phys(_ebss)-1; | 276 | bss_resource.end = virt_to_phys(__bss_stop)-1; |
277 | 277 | ||
278 | #ifdef CONFIG_CMDLINE_OVERWRITE | 278 | #ifdef CONFIG_CMDLINE_OVERWRITE |
279 | strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line)); | 279 | strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line)); |
diff --git a/arch/sh/kernel/sh_ksyms_32.c b/arch/sh/kernel/sh_ksyms_32.c index 3896f26efa4a..2a0a596ebf67 100644 --- a/arch/sh/kernel/sh_ksyms_32.c +++ b/arch/sh/kernel/sh_ksyms_32.c | |||
@@ -19,7 +19,6 @@ EXPORT_SYMBOL(csum_partial); | |||
19 | EXPORT_SYMBOL(csum_partial_copy_generic); | 19 | EXPORT_SYMBOL(csum_partial_copy_generic); |
20 | EXPORT_SYMBOL(copy_page); | 20 | EXPORT_SYMBOL(copy_page); |
21 | EXPORT_SYMBOL(__clear_user); | 21 | EXPORT_SYMBOL(__clear_user); |
22 | EXPORT_SYMBOL(_ebss); | ||
23 | EXPORT_SYMBOL(empty_zero_page); | 22 | EXPORT_SYMBOL(empty_zero_page); |
24 | 23 | ||
25 | #define DECLARE_EXPORT(name) \ | 24 | #define DECLARE_EXPORT(name) \ |
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S index c98905f71e28..db88cbf9eafd 100644 --- a/arch/sh/kernel/vmlinux.lds.S +++ b/arch/sh/kernel/vmlinux.lds.S | |||
@@ -78,7 +78,6 @@ SECTIONS | |||
78 | . = ALIGN(PAGE_SIZE); | 78 | . = ALIGN(PAGE_SIZE); |
79 | __init_end = .; | 79 | __init_end = .; |
80 | BSS_SECTION(0, PAGE_SIZE, 4) | 80 | BSS_SECTION(0, PAGE_SIZE, 4) |
81 | _ebss = .; /* uClinux MTD sucks */ | ||
82 | _end = . ; | 81 | _end = . ; |
83 | 82 | ||
84 | STABS_DEBUG | 83 | STABS_DEBUG |
diff --git a/arch/sh/lib/mcount.S b/arch/sh/lib/mcount.S index 84a57761f17e..60164e65d665 100644 --- a/arch/sh/lib/mcount.S +++ b/arch/sh/lib/mcount.S | |||
@@ -39,7 +39,7 @@ | |||
39 | * | 39 | * |
40 | * Make sure the stack pointer contains a valid address. Valid | 40 | * Make sure the stack pointer contains a valid address. Valid |
41 | * addresses for kernel stacks are anywhere after the bss | 41 | * addresses for kernel stacks are anywhere after the bss |
42 | * (after _ebss) and anywhere in init_thread_union (init_stack). | 42 | * (after __bss_stop) and anywhere in init_thread_union (init_stack). |
43 | */ | 43 | */ |
44 | #define STACK_CHECK() \ | 44 | #define STACK_CHECK() \ |
45 | mov #(THREAD_SIZE >> 10), r0; \ | 45 | mov #(THREAD_SIZE >> 10), r0; \ |
@@ -60,7 +60,7 @@ | |||
60 | cmp/hi r2, r1; \ | 60 | cmp/hi r2, r1; \ |
61 | bf stack_panic; \ | 61 | bf stack_panic; \ |
62 | \ | 62 | \ |
63 | /* If sp > _ebss then we're OK. */ \ | 63 | /* If sp > __bss_stop then we're OK. */ \ |
64 | mov.l .L_ebss, r1; \ | 64 | mov.l .L_ebss, r1; \ |
65 | cmp/hi r1, r15; \ | 65 | cmp/hi r1, r15; \ |
66 | bt 1f; \ | 66 | bt 1f; \ |
@@ -70,7 +70,7 @@ | |||
70 | cmp/hs r1, r15; \ | 70 | cmp/hs r1, r15; \ |
71 | bf stack_panic; \ | 71 | bf stack_panic; \ |
72 | \ | 72 | \ |
73 | /* If sp > init_stack && sp < _ebss, not OK. */ \ | 73 | /* If sp > init_stack && sp < __bss_stop, not OK. */ \ |
74 | add r0, r1; \ | 74 | add r0, r1; \ |
75 | cmp/hs r1, r15; \ | 75 | cmp/hs r1, r15; \ |
76 | bt stack_panic; \ | 76 | bt stack_panic; \ |
@@ -292,8 +292,6 @@ stack_panic: | |||
292 | nop | 292 | nop |
293 | 293 | ||
294 | .align 2 | 294 | .align 2 |
295 | .L_ebss: | ||
296 | .long _ebss | ||
297 | .L_init_thread_union: | 295 | .L_init_thread_union: |
298 | .long init_thread_union | 296 | .long init_thread_union |
299 | .Lpanic: | 297 | .Lpanic: |