summaryrefslogtreecommitdiff
path: root/arch/cris/arch-v32
diff options
context:
space:
mode:
authorJesper Nilsson <jesper.nilsson@axis.com>2008-01-30 12:57:31 +0100
committerJesper Nilsson <jesper.nilsson@axis.com>2008-02-08 11:06:36 +0100
commitbaa69b121a32f2b8ee388b651030f7f3c16df463 (patch)
treeb4788cdcb61636845713fa0fd21ca8f993c03e0b /arch/cris/arch-v32
parent52d82ef12a172124ee4aab06656c877868efc407 (diff)
CRIS v32: Fix startup oops and replace hardcoded pagesize in vmlinux.lds.S
- Move alignment of init data to page size outside define CONFIG_BLK_DEV_INITRD This avoids oops due to memory on the same page as init data being freed. - Change hardcoded page size to use macro from asm/page.h - Add reserved memory via CONFIG_ETRAX_VMEM_SIZE. - Use available defines for TEXT_TEXT and INITCALLS. - Cleanup whitespace.
Diffstat (limited to 'arch/cris/arch-v32')
-rw-r--r--arch/cris/arch-v32/vmlinux.lds.S74
1 files changed, 37 insertions, 37 deletions
diff --git a/arch/cris/arch-v32/vmlinux.lds.S b/arch/cris/arch-v32/vmlinux.lds.S
index fead8c59ea63..d5f28e40717c 100644
--- a/arch/cris/arch-v32/vmlinux.lds.S
+++ b/arch/cris/arch-v32/vmlinux.lds.S
@@ -9,6 +9,13 @@
*/
#include <asm-generic/vmlinux.lds.h>
+#include <asm/page.h>
+
+#ifdef CONFIG_ETRAX_VMEM_SIZE
+#define __CONFIG_ETRAX_VMEM_SIZE CONFIG_ETRAX_VMEM_SIZE
+#else
+#define __CONFIG_ETRAX_VMEM_SIZE 0
+#endif
jiffies = jiffies_64;
SECTIONS
@@ -17,18 +24,19 @@ SECTIONS
dram_start = .;
ebp_start = .;
- /* The boot section is only necessary until the VCS top level testbench */
- /* includes both flash and DRAM. */
+ /* The boot section is only necessary until the VCS top */
+ /* level testbench includes both flash and DRAM. */
.boot : { *(.boot) }
- . = DRAM_VIRTUAL_BASE + 0x4000; /* See head.S and pages reserved at the start. */
+ /* See head.S and pages reserved at the start. */
+ . = DRAM_VIRTUAL_BASE + 0x4000;
_text = .; /* Text and read-only data. */
text_start = .; /* Lots of aliases. */
_stext = .;
__stext = .;
.text : {
- *(.text)
+ TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
*(.fixup)
@@ -39,9 +47,9 @@ SECTIONS
__etext = .;
. = ALIGN(4); /* Exception table. */
- __start___ex_table = .;
- __ex_table : { *(__ex_table) }
- __stop___ex_table = .;
+ __start___ex_table = .;
+ __ex_table : { *(__ex_table) }
+ __stop___ex_table = .;
RODATA
@@ -54,33 +62,27 @@ SECTIONS
__edata = . ; /* End of data section. */
_edata = . ;
- . = ALIGN(8192); /* init_task and stack, must be aligned. */
- .data.init_task : { *(.data.init_task) }
+ . = ALIGN(PAGE_SIZE); /* init_task and stack, must be aligned. */
+ .data.init_task : { *(.data.init_task) }
- . = ALIGN(8192); /* Init code and data. */
- __init_begin = .;
+ . = ALIGN(PAGE_SIZE); /* Init code and data. */
+ __init_begin = .;
.init.text : {
_sinittext = .;
INIT_TEXT
_einittext = .;
}
.init.data : { INIT_DATA }
- . = ALIGN(16);
- __setup_start = .;
- .init.setup : { *(.init.setup) }
- __setup_end = .;
+ . = ALIGN(16);
+ __setup_start = .;
+ .init.setup : { *(.init.setup) }
+ __setup_end = .;
__start___param = .;
__param : { *(__param) }
__stop___param = .;
- .initcall.init : {
+ .initcall.init : {
__initcall_start = .;
- *(.initcall1.init);
- *(.initcall2.init);
- *(.initcall3.init);
- *(.initcall4.init);
- *(.initcall5.init);
- *(.initcall6.init);
- *(.initcall7.init);
+ INITCALLS
__initcall_end = .;
}
@@ -91,25 +93,23 @@ SECTIONS
}
SECURITY_INIT
- PERCPU(8192)
+ __vmlinux_end = .; /* Last address of the physical file. */
+ PERCPU(PAGE_SIZE)
-#ifdef CONFIG_BLK_DEV_INITRD
.init.ramfs : {
__initramfs_start = .;
*(.init.ramfs)
__initramfs_end = .;
- /*
- * We fill to the next page, so we can discard all init
- * pages without needing to consider what payload might be
- * appended to the kernel image.
- */
- FILL (0);
- . = ALIGN (8192);
}
-#endif
- __vmlinux_end = .; /* Last address of the physical file. */
- __init_end = .;
+ /*
+ * We fill to the next page, so we can discard all init
+ * pages without needing to consider what payload might be
+ * appended to the kernel image.
+ */
+ . = ALIGN (PAGE_SIZE);
+
+ __init_end = .;
__data_end = . ; /* Move to _edata? */
__bss_start = .; /* BSS. */
@@ -123,11 +123,11 @@ SECTIONS
__end = .;
/* Sections to be discarded */
- /DISCARD/ : {
+ /DISCARD/ : {
EXIT_TEXT
EXIT_DATA
*(.exitcall.exit)
}
- dram_end = dram_start + CONFIG_ETRAX_DRAM_SIZE*1024*1024;
+ dram_end = dram_start + (CONFIG_ETRAX_DRAM_SIZE - __CONFIG_ETRAX_VMEM_SIZE)*1024*1024;
}