Skip to content

Commit

Permalink
[S390] Fix alignment of initial kernel stack.
Browse files Browse the repository at this point in the history
We need an alignment of 16384 bytes for the initial kernel stack if
the kernel is configured for 16384 bytes stacks but the linker script
currently guarantees only an alignment of 8192 bytes.

So fix this and simply use THREAD_SIZE as alignment value which will
always do the right thing.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Nov 27, 2008
1 parent 2944a5c commit 0778dc3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/s390/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ EXPORT_SYMBOL(init_mm);
/*
* Initial thread structure.
*
* We need to make sure that this is 8192-byte aligned due to the
* We need to make sure that this is THREAD_SIZE aligned due to the
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
Expand Down
3 changes: 2 additions & 1 deletion arch/s390/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Written by Martin Schwidefsky (schwidefsky@de.ibm.com)
*/

#include <asm/thread_info.h>
#include <asm/page.h>
#include <asm-generic/vmlinux.lds.h>

Expand Down Expand Up @@ -86,7 +87,7 @@ SECTIONS
}
_edata = .; /* End of data section */

. = ALIGN(2 * PAGE_SIZE); /* init_task */
. = ALIGN(THREAD_SIZE); /* init_task */
.data.init_task : {
*(.data.init_task)
}
Expand Down

0 comments on commit 0778dc3

Please sign in to comment.