m68k: Replace m68k-specific _[se]bss by generic __bss_{start,stop}
Subsystems (3)
Geert Uytterhoeven
maintainerPATCH 2/2 m68k: Use asm-generic version of <asm/sections.h>
In reply to Geert UytterhoevenSigned-off-by Geert Uytterhoeven <[email protected]>
--- arch/m68k/include/asm/Kbuild | 1 + arch/m68k/include/asm/sections.h | 6 ------ 2 files changed, 1 insertions(+), 6 deletions(-) delete mode 100644 arch/m68k/include/asm/sections.h
arch/m68k/include/asm/Kbuild +1 -0
@@ -20,6 +20,7 @@ generic-y += mutex.h generic-y += percpu.h generic-y += resource.h generic-y += scatterlist.h +generic-y += sections.h generic-y += siginfo.h generic-y += statfs.h generic-y += topology.h
arch/m68k/include/asm/sections.h deleted +0 -6
@@ -1,6 +0,0 @@ -#ifndef _ASM_M68K_SECTIONS_H -#define _ASM_M68K_SECTIONS_H - -#include <asm-generic/sections.h> - -#endif /* _ASM_M68K_SECTIONS_H */
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH 1/2 m68k: Replace m68k-specific _[se]bss by generic __bss_{start,stop}
BSS_SECTION() provides the __bss_{start,stop} symbols, so there's no need to wrap our own _[se]bss around it.
Signed-off-by Geert Uytterhoeven <[email protected]>
---
Prerequisite: mtd/uclinux: Use generic __bss_stop instead of _ebss
arch/m68k/include/asm/sections.h | 2 -- arch/m68k/kernel/setup_no.c | 4 ++-- arch/m68k/kernel/vmlinux-nommu.lds | 2 -- arch/m68k/kernel/vmlinux-std.lds | 2 -- arch/m68k/kernel/vmlinux-sun3.lds | 2 -- arch/m68k/mm/init_mm.c | 2 +- arch/m68k/mm/init_no.c | 2 +- arch/m68k/platform/68328/head-de2.S | 8 ++++---- arch/m68k/platform/68328/head-pilot.S | 10 +++++----- arch/m68k/platform/68328/head-ram.S | 4 ++-- arch/m68k/platform/68328/head-rom.S | 6 +++--- arch/m68k/platform/68360/head-ram.S | 6 +++--- arch/m68k/platform/68360/head-rom.S | 8 ++++---- arch/m68k/platform/coldfire/head.S | 10 +++++----- 14 files changed, 30 insertions(+), 38 deletions(-)
arch/m68k/include/asm/sections.h +0 -2
@@ -3,6 +3,4 @@#include <asm-generic/sections.h> -extern char _sbss[], _ebss[]; -#endif /* _ASM_M68K_SECTIONS_H */
arch/m68k/kernel/setup_no.c +2 -2
@@ -219,9 +219,9 @@ void __init setup_arch(char **cmdline_p)#endif pr_debug ("KERNEL -> TEXT=0x%p-0x%p DATA=0x%p-0x%p BSS=0x%p-0x%p\n" , - _stext, _etext, _sdata, _edata, _sbss, _ebss); + _stext, _etext, _sdata, _edata, __bss_start, __bss_stop);pr_debug ("MEMORY -> ROMFS=0x%p-0x%06lx MEM=0x%06lx-0x%06lx\n " , - _ebss, memory_start, memory_start, memory_end); + __bss_stop, memory_start, memory_start, memory_end);/* Keep a copy of command line */ *cmdline_p = &command_line[0 ];
arch/m68k/kernel/vmlinux-nommu.lds +0 -2
@@ -78,9 +78,7 @@ SECTIONS { __init_end = .; } - _sbss = .; BSS_SECTION(0, 0, 0) - _ebss = .; _end = .;
arch/m68k/kernel/vmlinux-std.lds +0 -2
@@ -31,9 +31,7 @@ SECTIONS RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE) - _sbss = .; BSS_SECTION(0, 0, 0) - _ebss = .; _edata = .; /* End of data section */
arch/m68k/kernel/vmlinux-sun3.lds +0 -2
@@ -44,9 +44,7 @@ __init_begin = .; . = ALIGN(PAGE_SIZE); __init_end = .; - _sbss = .; BSS_SECTION(0, 0, 0) - _ebss = .; _end = . ;
arch/m68k/mm/init_mm.c +1 -1
@@ -104,7 +104,7 @@ void __init print_memmap(void)MLK_ROUNDUP (__init_begin, __init_end),MLK_ROUNDUP (_stext, _etext),MLK_ROUNDUP (_sdata, _edata), - MLK_ROUNDUP(_sbss, _ebss)); + MLK_ROUNDUP(__bss_start, __bss_stop)); }void __init mem_init (void )
arch/m68k/mm/init_no.c +1 -1
@@ -91,7 +91,7 @@ void __init mem_init(void) totalram_pages =free_all_bootmem (); codek = (_etext - _stext) >>10 ; - datak = (_ebss - _sdata) >>10 ; + datak = (__bss_stop - _sdata) >>10 ; initk = (__init_begin - __init_end) >>10 ; tmp =nr_free_pages () <<PAGE_SHIFT ;
arch/m68k/platform/68328/head-de2.S +4 -4
@@ -60,8 +60,8 @@ _start: * Move ROM filesystem above bss :-) */ - moveal #_sbss, %a0 /* romfs at the start of bss */ - moveal #_ebss, %a1 /* Set up destination */ + moveal #__bss_start, %a0 /* romfs at the start of bss */ + moveal #__bss_stop, %a1 /* Set up destination */ movel %a0, %a2 /* Copy of bss start */ movel 8(%a0), %d1 /* Get size of ROMFS */
@@ -84,8 +84,8 @@ _start: * Initialize BSS segment to 0 */ - lea _sbss, %a0 - lea _ebss, %a1 + lea __bss_start, %a0 + lea __bss_stop, %a1 /* Copy 0 to %a0 until %a0 == %a1 */ 2: cmpal %a0, %a1
arch/m68k/platform/68328/head-pilot.S +5 -5
@@ -110,7 +110,7 @@ L0: movel #CONFIG_VECTORBASE, %d7 addl #16, %d7 moveal %d7, %a0 - moveal #_ebss, %a1 + moveal #__bss_stop, %a1 lea %a1@(512), %a2 DBG_PUTC('C')
@@ -138,8 +138,8 @@ LD1: DBG_PUTC('E') - moveal #_sbss, %a0 - moveal #_ebss, %a1 + moveal #__bss_start, %a0 + moveal #__bss_stop, %a1 /* Copy 0 to %a0 until %a0 == %a1 */ L1:
@@ -150,7 +150,7 @@ L1: DBG_PUTC('F') /* Copy command line from end of bss to command line */ - moveal #_ebss, %a0 + moveal #__bss_stop, %a0 moveal #command_line, %a1 lea %a1@(512), %a2
@@ -165,7 +165,7 @@ L3: movel #_sdata, %d0 movel %d0, _rambase - movel #_ebss, %d0 + movel #__bss_stop, %d0 movel %d0, _ramstart movel %a4, %d0
arch/m68k/platform/68328/head-ram.S +2 -2
@@ -76,8 +76,8 @@ pclp3: beq pclp3 #endif /* DEBUG */ moveal #0x007ffff0, %ssp - moveal #_sbss, %a0 - moveal #_ebss, %a1 + moveal #__bss_start, %a0 + moveal #__bss_stop, %a1 /* Copy 0 to %a0 until %a0 >= %a1 */ L1:
arch/m68k/platform/68328/head-rom.S +3 -3
@@ -59,8 +59,8 @@ _stext: movew #0x2700,%sr cmpal %a1, %a2 bhi 1b - moveal #_sbss, %a0 - moveal #_ebss, %a1 + moveal #__bss_start, %a0 + moveal #__bss_stop, %a1 /* Copy 0 to %a0 until %a0 == %a1 */ 1:
@@ -70,7 +70,7 @@ _stext: movew #0x2700,%sr movel #_sdata, %d0 movel %d0, _rambase - movel #_ebss, %d0 + movel #__bss_stop, %d0 movel %d0, _ramstart movel #RAMEND-CONFIG_MEMORY_RESERVE*0x100000, %d0 movel %d0, _ramend
arch/m68k/platform/68360/head-ram.S +3 -3
@@ -219,8 +219,8 @@ LD1: cmp.l #_edata, %a1 blt LD1 - moveal #_sbss, %a0 - moveal #_ebss, %a1 + moveal #__bss_start, %a0 + moveal #__bss_stop, %a1 /* Copy 0 to %a0 until %a0 == %a1 */ L1:
@@ -234,7 +234,7 @@ load_quicc: store_ram_size: /* Set ram size information */ move.l #_sdata, _rambase - move.l #_ebss, _ramstart + move.l #__bss_stop, _ramstart move.l #RAMEND, %d0 sub.l #0x1000, %d0 /* Reserve 4K for stack space.*/ move.l %d0, _ramend /* Different from RAMEND.*/
arch/m68k/platform/68360/head-rom.S +4 -4
@@ -13,7 +13,7 @@ */ .global _stext -.global _sbss +.global __bss_start .global _start .global _rambase
@@ -229,8 +229,8 @@ LD1: cmp.l #_edata, %a1 blt LD1 - moveal #_sbss, %a0 - moveal #_ebss, %a1 + moveal #__bss_start, %a0 + moveal #__bss_stop, %a1 /* Copy 0 to %a0 until %a0 == %a1 */ L1:
@@ -244,7 +244,7 @@ load_quicc: store_ram_size: /* Set ram size information */ move.l #_sdata, _rambase - move.l #_ebss, _ramstart + move.l #__bss_stop, _ramstart move.l #RAMEND, %d0 sub.l #0x1000, %d0 /* Reserve 4K for stack space.*/ move.l %d0, _ramend /* Different from RAMEND.*/
arch/m68k/platform/coldfire/head.S +5 -5
@@ -230,8 +230,8 @@ _vstart: /* * Move ROM filesystem above bss :-) */ - lea _sbss,%a0 /* get start of bss */ - lea _ebss,%a1 /* set up destination */ + lea __bss_start,%a0 /* get start of bss */ + lea __bss_stop,%a1 /* set up destination */ movel %a0,%a2 /* copy of bss start */ movel 8(%a0),%d0 /* get size of ROMFS */
@@ -249,7 +249,7 @@ _copy_romfs: bne _copy_romfs #else /* CONFIG_ROMFS_FS */ - lea _ebss,%a1 + lea __bss_stop,%a1 movel %a1,_ramstart #endif /* CONFIG_ROMFS_FS */
@@ -257,8 +257,8 @@ _copy_romfs: /* * Zero out the bss region. */ - lea _sbss,%a0 /* get start of bss */ - lea _ebss,%a1 /* get end of bss */ + lea __bss_start,%a0 /* get start of bss */ + lea __bss_stop,%a1 /* get end of bss */ clrl %d0 /* set value */ _clear_bss: movel %d0,(%a0)+ /* clear each word */
Signature · 1 line
1.7.0.4
Geert Uytterhoeven
maintainerPATCH 2/2 m68k: Use asm-generic version of <asm/sections.h>
Signed-off-by Geert Uytterhoeven <[email protected]>
--- arch/m68k/include/asm/Kbuild | 1 + arch/m68k/include/asm/sections.h | 6 ------ 2 files changed, 1 insertions(+), 6 deletions(-) delete mode 100644 arch/m68k/include/asm/sections.h
arch/m68k/include/asm/Kbuild +1 -0
@@ -20,6 +20,7 @@ generic-y += mutex.h generic-y += percpu.h generic-y += resource.h generic-y += scatterlist.h +generic-y += sections.h generic-y += siginfo.h generic-y += statfs.h generic-y += topology.h
arch/m68k/include/asm/sections.h deleted +0 -6
@@ -1,6 +0,0 @@ -#ifndef _ASM_M68K_SECTIONS_H -#define _ASM_M68K_SECTIONS_H - -#include <asm-generic/sections.h> - -#endif /* _ASM_M68K_SECTIONS_H */
Signature · 1 line
1.7.0.4
Hi Geert,
Quoted 4 lines · Geert Uytterhoeven
BSS_SECTION()provides the __bss_{start,stop} symbols, so there's no need to wrap our own _[se]bss around it.Signed-off-by Geert Uytterhoeven<[email protected]>
Both these patches look good to me:
Acked-by Greg Ungerer<[email protected]>
Thanks
Greg
Quoted 17 lines
Prerequisite: mtd/uclinux: Use generic
__bss_stopinstead of_ebssarch/m68k/include/asm/sections.h | 2 -- arch/m68k/kernel/setup_no.c | 4 ++-- arch/m68k/kernel/vmlinux-nommu.lds | 2 -- arch/m68k/kernel/vmlinux-std.lds | 2 -- arch/m68k/kernel/vmlinux-sun3.lds | 2 -- arch/m68k/mm/init_mm.c | 2 +- arch/m68k/mm/init_no.c | 2 +- arch/m68k/platform/68328/head-de2.S | 8 ++++---- arch/m68k/platform/68328/head-pilot.S | 10 +++++----- arch/m68k/platform/68328/head-ram.S | 4 ++-- arch/m68k/platform/68328/head-rom.S | 6 +++--- arch/m68k/platform/68360/head-ram.S | 6 +++--- arch/m68k/platform/68360/head-rom.S | 8 ++++---- arch/m68k/platform/coldfire/head.S | 10 +++++----- 14 files changed, 30 insertions(+), 38 deletions(-)
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: [email protected] SnapGear Group, McAfee PHONE: +61 7 3435 2888 8 Gardner Close FAX: +61 7 3217 5323 Milton, QLD, 4064, Australia WEB: http://www.SnapGear.com