summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBernd Schmidt <bernd.schmidt@analog.com>2007-07-25 10:19:59 +0800
committerBryan Wu <bryan.wu@analog.com>2007-07-25 10:19:59 +0800
commit0fa63ad7d1450a7ea2b5e5f60bbc64f5ed5a5adc (patch)
tree4a9fb8359d41d652d8c1a5f1580c75cb3f87204d /arch
parentf1b927dc851a2eb1e13a8d21aca18036f6cb8629 (diff)
downloadblackbird-op-linux-0fa63ad7d1450a7ea2b5e5f60bbc64f5ed5a5adc.tar.gz
blackbird-op-linux-0fa63ad7d1450a7ea2b5e5f60bbc64f5ed5a5adc.zip
Blackfin arch: fix bug which unaligns the init thread's stack and causes the current macro to fail.
switch to using proper defines this time (THREAD_SIZE and PAGE_SIZE) instead of just PAGE_SIZE everywhere Signed-off-by: Mike Frysinger <michael.frysinger@analog.com> Signed-off-by: Bernd Schmidt <bernd.schmidt@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/kernel/vmlinux.lds.S16
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S
index d06f860f4790..fb53780247bc 100644
--- a/arch/blackfin/kernel/vmlinux.lds.S
+++ b/arch/blackfin/kernel/vmlinux.lds.S
@@ -32,6 +32,7 @@
#include <asm-generic/vmlinux.lds.h>
#include <asm/mem_map.h>
#include <asm/page.h>
+#include <asm/thread_info.h>
OUTPUT_FORMAT("elf32-bfin")
ENTRY(__start)
@@ -64,8 +65,12 @@ SECTIONS
.data :
{
- . = ALIGN(PAGE_SIZE);
+ /* make sure the init_task is aligned to the
+ * kernel thread size so we can locate the kernel
+ * stack properly and quickly.
+ */
__sdata = .;
+ . = ALIGN(THREAD_SIZE);
*(.data.init_task)
DATA_DATA
CONSTRUCTORS
@@ -73,14 +78,14 @@ SECTIONS
. = ALIGN(32);
*(.data.cacheline_aligned)
- . = ALIGN(PAGE_SIZE);
+ . = ALIGN(THREAD_SIZE);
__edata = .;
}
- . = ALIGN(PAGE_SIZE);
___init_begin = .;
.init :
{
+ . = ALIGN(PAGE_SIZE);
__sinittext = .;
*(.init.text)
__einittext = .;
@@ -153,10 +158,9 @@ SECTIONS
__ebss_b_l1 = .;
}
- . = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1);
- ___init_end = ALIGN(PAGE_SIZE);
+ ___init_end = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1);
- .bss ___init_end :
+ .bss LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1) :
{
. = ALIGN(4);
___bss_start = .;
OpenPOWER on IntegriCloud