aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-11-01 12:52:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-11-01 12:52:43 -0400
commitcdce1f0931831cebfbeb811a266a2f4adf5c8a35 (patch)
tree6d7e41800f767e34ea33eeedb6c4a9bb6dd7052c
parent0242909a6135e10a28822c64f9ad50fdad52757c (diff)
parentc5ec6fb08d7806cf1a9e4fceed15f5d4a69f885e (diff)
Merge branch 'link_removal' of git://www.jni.nu/cris
* 'link_removal' of git://www.jni.nu/cris: [CRIS] Remove links from CRIS build [CRIS] Merge asm-offsets.c for both arches into one file.
-rw-r--r--arch/cris/Makefile65
-rw-r--r--arch/cris/arch-v10/kernel/asm-offsets.c47
-rw-r--r--arch/cris/arch-v10/vmlinux.lds.S118
-rw-r--r--arch/cris/arch-v32/boot/compressed/head.S16
-rw-r--r--arch/cris/arch-v32/kernel/head.S20
-rw-r--r--arch/cris/kernel/asm-offsets.c (renamed from arch/cris/arch-v32/kernel/asm-offsets.c)51
-rw-r--r--arch/cris/kernel/vmlinux.lds.S (renamed from arch/cris/arch-v32/vmlinux.lds.S)44
7 files changed, 115 insertions, 246 deletions
diff --git a/arch/cris/Makefile b/arch/cris/Makefile
index 22825a7bbe57..3662cfb7b61d 100644
--- a/arch/cris/Makefile
+++ b/arch/cris/Makefile
@@ -23,7 +23,8 @@ mach-$(CONFIG_ETRAXFS) := fs
23 23
24ifneq ($(arch-y),) 24ifneq ($(arch-y),)
25SARCH := arch-$(arch-y) 25SARCH := arch-$(arch-y)
26inc := -Iarch/cris/include/arch-$(arch-y) -Iarch/cris/include/arch-$(arch-y)/arch 26inc := -Iarch/cris/include/$(SARCH)
27inc += -Iarch/cris/include/$(SARCH)/arch
27else 28else
28SARCH := 29SARCH :=
29inc := 30inc :=
@@ -52,74 +53,48 @@ KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g
52KBUILD_CFLAGS += -fno-omit-frame-pointer 53KBUILD_CFLAGS += -fno-omit-frame-pointer
53endif 54endif
54 55
55head-y := arch/$(ARCH)/$(SARCH)/kernel/head.o 56head-y := arch/cris/$(SARCH)/kernel/head.o
56 57
57LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a) 58LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a)
58 59
59core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ 60core-y += arch/cris/kernel/ arch/cris/mm/
60core-y += arch/$(ARCH)/$(SARCH)/kernel/ arch/$(ARCH)/$(SARCH)/mm/ 61core-y += arch/cris/$(SARCH)/kernel/ arch/cris/$(SARCH)/mm/
61ifdef CONFIG_ETRAX_ARCH_V32 62ifdef CONFIG_ETRAX_ARCH_V32
62core-y += arch/$(ARCH)/$(SARCH)/$(MACH)/ 63core-y += arch/cris/$(SARCH)/$(MACH)/
63endif 64endif
64drivers-y += arch/$(ARCH)/$(SARCH)/drivers/ 65drivers-y += arch/cris/$(SARCH)/drivers/
65libs-y += arch/$(ARCH)/$(SARCH)/lib/ $(LIBGCC) 66libs-y += arch/cris/$(SARCH)/lib/ $(LIBGCC)
66 67
67# cris source path 68# cris source path
68SRC_ARCH = $(srctree)/arch/$(ARCH) 69SRC_ARCH = $(srctree)/arch/cris
69# cris object files path 70# cris object files path
70OBJ_ARCH = $(objtree)/arch/$(ARCH) 71OBJ_ARCH = $(objtree)/arch/cris
71 72
72boot := arch/$(ARCH)/boot 73boot := arch/cris/$(SARCH)/boot
73MACHINE := arch/$(ARCH)/$(SARCH) 74MACHINE := arch/cris/$(SARCH)
74 75
75all: zImage 76all: zImage
76 77
77zImage Image: vmlinux 78zImage Image: vmlinux
78 $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ 79 $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
79 80
80archprepare: $(SRC_ARCH)/.links FORCE 81archprepare:
81
82# Create some links to make all tools happy
83$(SRC_ARCH)/.links:
84 @rm -rf $(SRC_ARCH)/drivers
85 @ln -sfn $(SARCH)/drivers $(SRC_ARCH)/drivers
86 @rm -rf $(SRC_ARCH)/boot
87 @ln -sfn $(SARCH)/boot $(SRC_ARCH)/boot
88 @rm -rf $(SRC_ARCH)/lib
89 @ln -sfn $(SARCH)/lib $(SRC_ARCH)/lib
90 @rm -f $(SRC_ARCH)/arch/mach
91 @rm -rf $(SRC_ARCH)/arch
92 @ln -sfn $(SARCH) $(SRC_ARCH)/arch
93ifdef CONFIG_ETRAX_ARCH_V32
94 @ln -sfn ../$(SARCH)/$(MACH) $(SRC_ARCH)/arch/mach
95endif
96 @rm -rf $(SRC_ARCH)/kernel/vmlinux.lds.S
97 @ln -sfn ../$(SARCH)/vmlinux.lds.S $(SRC_ARCH)/kernel/vmlinux.lds.S
98 @rm -rf $(SRC_ARCH)/kernel/asm-offsets.c
99 @ln -sfn ../$(SARCH)/kernel/asm-offsets.c $(SRC_ARCH)/kernel/asm-offsets.c
100 @touch $@
101 82
102archclean: 83archclean:
103 $(Q)if [ -e arch/$(ARCH)/boot ]; then \ 84 $(Q)if [ -e arch/cris/$(SARCH)/boot ]; then \
104 $(MAKE) $(clean)=arch/$(ARCH)/boot; \ 85 $(MAKE) $(clean)=arch/cris/$(SARCH)/boot; \
105 fi 86 fi
106 87
107CLEAN_FILES += \ 88CLEAN_FILES += \
108 $(MACHINE)/boot/zImage \ 89 $(MACHINE)/boot/zImage \
109 $(MACHINE)/boot/compressed/decompress.bin \ 90 $(MACHINE)/boot/compressed/decompress.bin \
110 $(MACHINE)/boot/compressed/piggy.gz \ 91 $(MACHINE)/boot/compressed/piggy.gz \
111 $(MACHINE)/boot/rescue/rescue.bin \ 92 $(MACHINE)/boot/rescue/rescue.bin
112 $(SRC_ARCH)/.links 93
113 94
114MRPROPER_FILES += \ 95# MRPROPER_FILES +=
115 $(SRC_ARCH)/drivers \
116 $(SRC_ARCH)/boot \
117 $(SRC_ARCH)/lib \
118 $(SRC_ARCH)/arch \
119 $(SRC_ARCH)/kernel/vmlinux.lds.S \
120 $(SRC_ARCH)/kernel/asm-offsets.c
121 96
122define archhelp 97define archhelp
123 echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' 98 echo '* zImage - Compressed kernel image (arch/cris/boot/zImage)'
124 echo '* Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' 99 echo '* Image - Uncompressed kernel image (arch/cris/boot/Image)'
125endef 100endef
diff --git a/arch/cris/arch-v10/kernel/asm-offsets.c b/arch/cris/arch-v10/kernel/asm-offsets.c
deleted file mode 100644
index 1aa3cc4e7107..000000000000
--- a/arch/cris/arch-v10/kernel/asm-offsets.c
+++ /dev/null
@@ -1,47 +0,0 @@
1#include <linux/sched.h>
2#include <asm/thread_info.h>
3
4/*
5 * Generate definitions needed by assembly language modules.
6 * This code generates raw asm output which is post-processed to extract
7 * and format the required data.
8 */
9
10#define DEFINE(sym, val) \
11 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
12
13#define BLANK() asm volatile("\n->" : : )
14
15int main(void)
16{
17#define ENTRY(entry) DEFINE(PT_ ## entry, offsetof(struct pt_regs, entry))
18 ENTRY(orig_r10);
19 ENTRY(r13);
20 ENTRY(r12);
21 ENTRY(r11);
22 ENTRY(r10);
23 ENTRY(r9);
24 ENTRY(mof);
25 ENTRY(dccr);
26 ENTRY(srp);
27 BLANK();
28#undef ENTRY
29#define ENTRY(entry) DEFINE(TI_ ## entry, offsetof(struct thread_info, entry))
30 ENTRY(task);
31 ENTRY(flags);
32 ENTRY(preempt_count);
33 BLANK();
34#undef ENTRY
35#define ENTRY(entry) DEFINE(THREAD_ ## entry, offsetof(struct thread_struct, entry))
36 ENTRY(ksp);
37 ENTRY(usp);
38 ENTRY(dccr);
39 BLANK();
40#undef ENTRY
41#define ENTRY(entry) DEFINE(TASK_ ## entry, offsetof(struct task_struct, entry))
42 ENTRY(pid);
43 BLANK();
44 DEFINE(LCLONE_VM, CLONE_VM);
45 DEFINE(LCLONE_UNTRACED, CLONE_UNTRACED);
46 return 0;
47}
diff --git a/arch/cris/arch-v10/vmlinux.lds.S b/arch/cris/arch-v10/vmlinux.lds.S
deleted file mode 100644
index 93c9f0ea286b..000000000000
--- a/arch/cris/arch-v10/vmlinux.lds.S
+++ /dev/null
@@ -1,118 +0,0 @@
1/* ld script to make the Linux/CRIS kernel
2 * Authors: Bjorn Wesen (bjornw@axis.com)
3 *
4 * It is VERY DANGEROUS to fiddle around with the symbols in this
5 * script. It is for example quite vital that all generated sections
6 * that are used are actually named here, otherwise the linker will
7 * put them at the end, where the init stuff is which is FREED after
8 * the kernel has booted.
9 */
10
11#include <asm-generic/vmlinux.lds.h>
12#include <asm/page.h>
13
14jiffies = jiffies_64;
15SECTIONS
16{
17 . = DRAM_VIRTUAL_BASE;
18 dram_start = .;
19 ibr_start = .;
20 . = . + 0x4000; /* see head.S and pages reserved at the start */
21
22 _text = .; /* Text and read-only data */
23 text_start = .; /* lots of aliases */
24 _stext = .;
25 __stext = .;
26 .text : {
27 TEXT_TEXT
28 SCHED_TEXT
29 LOCK_TEXT
30 *(.fixup)
31 *(.text.__*)
32 }
33
34 _etext = . ; /* End of text section */
35 __etext = .;
36
37 . = ALIGN(4); /* Exception table */
38 __start___ex_table = .;
39 __ex_table : { *(__ex_table) }
40 __stop___ex_table = .;
41
42 RODATA
43
44 . = ALIGN (4);
45 ___data_start = . ;
46 __Sdata = . ;
47 .data : { /* Data */
48 DATA_DATA
49 }
50 __edata = . ; /* End of data section */
51 _edata = . ;
52
53 . = ALIGN(PAGE_SIZE); /* init_task and stack, must be aligned */
54 .data.init_task : { *(.data.init_task) }
55
56 . = ALIGN(PAGE_SIZE); /* Init code and data */
57 __init_begin = .;
58 .init.text : {
59 _sinittext = .;
60 INIT_TEXT
61 _einittext = .;
62 }
63 .init.data : { INIT_DATA }
64 . = ALIGN(16);
65 __setup_start = .;
66 .init.setup : { *(.init.setup) }
67 __setup_end = .;
68 .initcall.init : {
69 __initcall_start = .;
70 INITCALLS
71 __initcall_end = .;
72 }
73
74 .con_initcall.init : {
75 __con_initcall_start = .;
76 *(.con_initcall.init)
77 __con_initcall_end = .;
78 }
79 SECURITY_INIT
80
81#ifdef CONFIG_BLK_DEV_INITRD
82 .init.ramfs : {
83 __initramfs_start = .;
84 *(.init.ramfs)
85 __initramfs_end = .;
86 }
87#endif
88 __vmlinux_end = .; /* last address of the physical file */
89
90 /*
91 * We fill to the next page, so we can discard all init
92 * pages without needing to consider what payload might be
93 * appended to the kernel image.
94 */
95 . = ALIGN(PAGE_SIZE);
96
97 __init_end = .;
98
99 __data_end = . ; /* Move to _edata ? */
100 __bss_start = .; /* BSS */
101 .bss : {
102 *(COMMON)
103 *(.bss)
104 }
105
106 . = ALIGN (0x20);
107 _end = .;
108 __end = .;
109
110 /* Sections to be discarded */
111 /DISCARD/ : {
112 EXIT_TEXT
113 EXIT_DATA
114 *(.exitcall.exit)
115 }
116
117 dram_end = dram_start + CONFIG_ETRAX_DRAM_SIZE*1024*1024;
118}
diff --git a/arch/cris/arch-v32/boot/compressed/head.S b/arch/cris/arch-v32/boot/compressed/head.S
index ea3012993b07..a4a65c5c669e 100644
--- a/arch/cris/arch-v32/boot/compressed/head.S
+++ b/arch/cris/arch-v32/boot/compressed/head.S
@@ -28,7 +28,13 @@ _start:
28 beq dram_init_finished 28 beq dram_init_finished
29 nop 29 nop
30 30
31#include "../../mach/dram_init.S" 31#if defined CONFIG_ETRAXFS
32#include "../../mach-fs/dram_init.S"
33#elif defined CONFIG_CRIS_MACH_ARTPEC3
34#include "../../mach-a3/dram_init.S"
35#else
36#error Only ETRAXFS and ARTPEC-3 supported!
37#endif
32 38
33dram_init_finished: 39dram_init_finished:
34 40
@@ -130,4 +136,10 @@ _cmd_line_addr:
130_boot_source: 136_boot_source:
131 .dword 0 137 .dword 0
132 138
133#include "../../mach/hw_settings.S" 139#if defined CONFIG_ETRAXFS
140#include "../../mach-fs/hw_settings.S"
141#elif defined CONFIG_CRIS_MACH_ARTPEC3
142#include "../../mach-a3/hw_settings.S"
143#else
144#error Only ETRAXFS and ARTPEC-3 supported!
145#endif
diff --git a/arch/cris/arch-v32/kernel/head.S b/arch/cris/arch-v32/kernel/head.S
index f902d87fb5de..3db478eb5155 100644
--- a/arch/cris/arch-v32/kernel/head.S
+++ b/arch/cris/arch-v32/kernel/head.S
@@ -10,8 +10,9 @@
10 * The macros found in mmu_defs_asm.h uses the ## concatenation operator, so 10 * The macros found in mmu_defs_asm.h uses the ## concatenation operator, so
11 * -traditional must not be used when assembling this file. 11 * -traditional must not be used when assembling this file.
12 */ 12 */
13#include <hwregs/reg_rdwr.h> 13#include <linux/autoconf.h>
14#include <arch/memmap.h> 14#include <arch/memmap.h>
15#include <hwregs/reg_rdwr.h>
15#include <hwregs/intr_vect.h> 16#include <hwregs/intr_vect.h>
16#include <hwregs/asm/mmu_defs_asm.h> 17#include <hwregs/asm/mmu_defs_asm.h>
17#include <hwregs/asm/reg_map_asm.h> 18#include <hwregs/asm/reg_map_asm.h>
@@ -217,7 +218,14 @@ _inflash:
217 beq _dram_initialized 218 beq _dram_initialized
218 nop 219 nop
219 220
220#include "../mach/dram_init.S" 221#if defined CONFIG_ETRAXFS
222#include "../mach-fs/dram_init.S"
223#elif defined CONFIG_CRIS_MACH_ARTPEC3
224#include "../mach-a3/dram_init.S"
225#else
226#error Only ETRAXFS and ARTPEC-3 supported!
227#endif
228
221 229
222_dram_initialized: 230_dram_initialized:
223 ;; Copy the text and data section to DRAM. This depends on that the 231 ;; Copy the text and data section to DRAM. This depends on that the
@@ -472,4 +480,10 @@ swapper_pg_dir = 0xc0002000
472 480
473 .section ".init.data", "aw" 481 .section ".init.data", "aw"
474 482
475#include "../mach/hw_settings.S" 483#if defined CONFIG_ETRAXFS
484#include "../mach-fs/hw_settings.S"
485#elif defined CONFIG_CRIS_MACH_ARTPEC3
486#include "../mach-a3/hw_settings.S"
487#else
488#error Only ETRAXFS and ARTPEC-3 supported!
489#endif
diff --git a/arch/cris/arch-v32/kernel/asm-offsets.c b/arch/cris/kernel/asm-offsets.c
index 15b3d93a0496..ddd6fbbe75de 100644
--- a/arch/cris/arch-v32/kernel/asm-offsets.c
+++ b/arch/cris/kernel/asm-offsets.c
@@ -1,5 +1,6 @@
1#include <linux/sched.h> 1#include <linux/sched.h>
2#include <asm/thread_info.h> 2#include <asm/thread_info.h>
3#include <linux/autoconf.h>
3 4
4/* 5/*
5 * Generate definitions needed by assembly language modules. 6 * Generate definitions needed by assembly language modules.
@@ -8,10 +9,14 @@
8 */ 9 */
9 10
10#define DEFINE(sym, val) \ 11#define DEFINE(sym, val) \
11 asm volatile("\n->" #sym " %0 " #val : : "i" (val)) 12 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
12 13
13#define BLANK() asm volatile("\n->" : : ) 14#define BLANK() asm volatile("\n->" : : )
14 15
16#if !defined(CONFIG_ETRAX_ARCH_V10) && !defined(CONFIG_ETRAX_ARCH_V32)
17#error One of ARCH v10 and ARCH v32 must be true!
18#endif
19
15int main(void) 20int main(void)
16{ 21{
17#define ENTRY(entry) DEFINE(PT_ ## entry, offsetof(struct pt_regs, entry)) 22#define ENTRY(entry) DEFINE(PT_ ## entry, offsetof(struct pt_regs, entry))
@@ -19,31 +24,41 @@ int main(void)
19 ENTRY(r13); 24 ENTRY(r13);
20 ENTRY(r12); 25 ENTRY(r12);
21 ENTRY(r11); 26 ENTRY(r11);
22 ENTRY(r10); 27 ENTRY(r10);
23 ENTRY(r9); 28 ENTRY(r9);
29#ifdef CONFIG_ETRAX_ARCH_V32
24 ENTRY(acr); 30 ENTRY(acr);
25 ENTRY(srs); 31 ENTRY(srs);
26 ENTRY(mof); 32#endif
27 ENTRY(ccs); 33 ENTRY(mof);
28 ENTRY(srp); 34#ifdef CONFIG_ETRAX_ARCH_V10
35 ENTRY(dccr);
36#else
37 ENTRY(ccs);
38#endif
39 ENTRY(srp);
29 BLANK(); 40 BLANK();
30#undef ENTRY 41#undef ENTRY
31#define ENTRY(entry) DEFINE(TI_ ## entry, offsetof(struct thread_info, entry)) 42#define ENTRY(entry) DEFINE(TI_ ## entry, offsetof(struct thread_info, entry))
32 ENTRY(task); 43 ENTRY(task);
33 ENTRY(flags); 44 ENTRY(flags);
34 ENTRY(preempt_count); 45 ENTRY(preempt_count);
35 BLANK(); 46 BLANK();
36#undef ENTRY 47#undef ENTRY
37#define ENTRY(entry) DEFINE(THREAD_ ## entry, offsetof(struct thread_struct, entry)) 48#define ENTRY(entry) DEFINE(THREAD_ ## entry, offsetof(struct thread_struct, entry))
38 ENTRY(ksp); 49 ENTRY(ksp);
39 ENTRY(usp); 50 ENTRY(usp);
40 ENTRY(ccs); 51#ifdef CONFIG_ETRAX_ARCH_V10
41 BLANK(); 52 ENTRY(dccr);
53#else
54 ENTRY(ccs);
55#endif
56 BLANK();
42#undef ENTRY 57#undef ENTRY
43#define ENTRY(entry) DEFINE(TASK_ ## entry, offsetof(struct task_struct, entry)) 58#define ENTRY(entry) DEFINE(TASK_ ## entry, offsetof(struct task_struct, entry))
44 ENTRY(pid); 59 ENTRY(pid);
45 BLANK(); 60 BLANK();
46 DEFINE(LCLONE_VM, CLONE_VM); 61 DEFINE(LCLONE_VM, CLONE_VM);
47 DEFINE(LCLONE_UNTRACED, CLONE_UNTRACED); 62 DEFINE(LCLONE_UNTRACED, CLONE_UNTRACED);
48 return 0; 63 return 0;
49} 64}
diff --git a/arch/cris/arch-v32/vmlinux.lds.S b/arch/cris/kernel/vmlinux.lds.S
index d5f28e40717c..0d2adfc794d4 100644
--- a/arch/cris/arch-v32/vmlinux.lds.S
+++ b/arch/cris/kernel/vmlinux.lds.S
@@ -8,6 +8,7 @@
8 * the kernel has booted. 8 * the kernel has booted.
9 */ 9 */
10 10
11#include <linux/autoconf.h>
11#include <asm-generic/vmlinux.lds.h> 12#include <asm-generic/vmlinux.lds.h>
12#include <asm/page.h> 13#include <asm/page.h>
13 14
@@ -17,22 +18,26 @@
17#define __CONFIG_ETRAX_VMEM_SIZE 0 18#define __CONFIG_ETRAX_VMEM_SIZE 0
18#endif 19#endif
19 20
21
20jiffies = jiffies_64; 22jiffies = jiffies_64;
21SECTIONS 23SECTIONS
22{ 24{
23 . = DRAM_VIRTUAL_BASE; 25 . = DRAM_VIRTUAL_BASE;
24 dram_start = .; 26 dram_start = .;
27#ifdef CONFIG_ETRAX_ARCH_V10
28 ibr_start = .;
29#else
25 ebp_start = .; 30 ebp_start = .;
26
27 /* The boot section is only necessary until the VCS top */ 31 /* The boot section is only necessary until the VCS top */
28 /* level testbench includes both flash and DRAM. */ 32 /* level testbench includes both flash and DRAM. */
29 .boot : { *(.boot) } 33 .boot : { *(.boot) }
34#endif
30 35
31 /* See head.S and pages reserved at the start. */ 36 /* see head.S and pages reserved at the start */
32 . = DRAM_VIRTUAL_BASE + 0x4000; 37 . = DRAM_VIRTUAL_BASE + 0x4000;
33 38
34 _text = .; /* Text and read-only data. */ 39 _text = .; /* Text and read-only data. */
35 text_start = .; /* Lots of aliases. */ 40 text_start = .; /* Lots of aliases. */
36 _stext = .; 41 _stext = .;
37 __stext = .; 42 __stext = .;
38 .text : { 43 .text : {
@@ -43,10 +48,10 @@ SECTIONS
43 *(.text.__*) 48 *(.text.__*)
44 } 49 }
45 50
46 _etext = . ; /* End of text section. */ 51 _etext = . ; /* End of text section. */
47 __etext = .; 52 __etext = .;
48 53
49 . = ALIGN(4); /* Exception table. */ 54 . = ALIGN(4); /* Exception table. */
50 __start___ex_table = .; 55 __start___ex_table = .;
51 __ex_table : { *(__ex_table) } 56 __ex_table : { *(__ex_table) }
52 __stop___ex_table = .; 57 __stop___ex_table = .;
@@ -56,16 +61,16 @@ SECTIONS
56 . = ALIGN (4); 61 . = ALIGN (4);
57 ___data_start = . ; 62 ___data_start = . ;
58 __Sdata = . ; 63 __Sdata = . ;
59 .data : { /* Data */ 64 .data : { /* Data */
60 DATA_DATA 65 DATA_DATA
61 } 66 }
62 __edata = . ; /* End of data section. */ 67 __edata = . ; /* End of data section. */
63 _edata = . ; 68 _edata = . ;
64 69
65 . = ALIGN(PAGE_SIZE); /* init_task and stack, must be aligned. */ 70 . = ALIGN(PAGE_SIZE); /* init_task and stack, must be aligned. */
66 .data.init_task : { *(.data.init_task) } 71 .data.init_task : { *(.data.init_task) }
67 72
68 . = ALIGN(PAGE_SIZE); /* Init code and data. */ 73 . = ALIGN(PAGE_SIZE); /* Init code and data. */
69 __init_begin = .; 74 __init_begin = .;
70 .init.text : { 75 .init.text : {
71 _sinittext = .; 76 _sinittext = .;
@@ -77,9 +82,11 @@ SECTIONS
77 __setup_start = .; 82 __setup_start = .;
78 .init.setup : { *(.init.setup) } 83 .init.setup : { *(.init.setup) }
79 __setup_end = .; 84 __setup_end = .;
85#ifdef CONFIG_ETRAX_ARCH_V32
80 __start___param = .; 86 __start___param = .;
81 __param : { *(__param) } 87 __param : { *(__param) }
82 __stop___param = .; 88 __stop___param = .;
89#endif
83 .initcall.init : { 90 .initcall.init : {
84 __initcall_start = .; 91 __initcall_start = .;
85 INITCALLS 92 INITCALLS
@@ -93,7 +100,17 @@ SECTIONS
93 } 100 }
94 SECURITY_INIT 101 SECURITY_INIT
95 102
96 __vmlinux_end = .; /* Last address of the physical file. */ 103#ifdef CONFIG_ETRAX_ARCH_V10
104#ifdef CONFIG_BLK_DEV_INITRD
105 .init.ramfs : {
106 __initramfs_start = .;
107 *(.init.ramfs)
108 __initramfs_end = .;
109 }
110#endif
111#endif
112 __vmlinux_end = .; /* Last address of the physical file. */
113#ifdef CONFIG_ETRAX_ARCH_V32
97 PERCPU(PAGE_SIZE) 114 PERCPU(PAGE_SIZE)
98 115
99 .init.ramfs : { 116 .init.ramfs : {
@@ -101,18 +118,19 @@ SECTIONS
101 *(.init.ramfs) 118 *(.init.ramfs)
102 __initramfs_end = .; 119 __initramfs_end = .;
103 } 120 }
121#endif
104 122
105 /* 123 /*
106 * We fill to the next page, so we can discard all init 124 * We fill to the next page, so we can discard all init
107 * pages without needing to consider what payload might be 125 * pages without needing to consider what payload might be
108 * appended to the kernel image. 126 * appended to the kernel image.
109 */ 127 */
110 . = ALIGN (PAGE_SIZE); 128 . = ALIGN(PAGE_SIZE);
111 129
112 __init_end = .; 130 __init_end = .;
113 131
114 __data_end = . ; /* Move to _edata? */ 132 __data_end = . ; /* Move to _edata ? */
115 __bss_start = .; /* BSS. */ 133 __bss_start = .; /* BSS. */
116 .bss : { 134 .bss : {
117 *(COMMON) 135 *(COMMON)
118 *(.bss) 136 *(.bss)