Construct init thread stack in the linker script rather than by union
authorDavid Howells <dhowells@redhat.com>
Tue, 2 Jan 2018 15:12:01 +0000 (15:12 +0000)
committerDavid Howells <dhowells@redhat.com>
Tue, 9 Jan 2018 23:21:02 +0000 (23:21 +0000)
commit0500871f21b237b2bea2d9db405eadf78e5aab05
tree6004424368ea44f74d9d9d66fb565a59d3dba970
parent138101932054268a235c6ac7cf474f6a88fcd885
Construct init thread stack in the linker script rather than by union

Construct the init thread stack in the linker script rather than doing it
by means of a union so that ia64's init_task.c can be got rid of.

The following symbols are then made available from INIT_TASK_DATA() linker
script macro:

init_thread_union
init_stack

INIT_TASK_DATA() also expands the region to THREAD_SIZE to accommodate the
size of the init stack.  init_thread_union is given its own section so that
it can be placed into the stack space in the right order.  I'm assuming
that the ia64 ordering is correct and that the task_struct is first and the
thread_info second.

Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Tony Luck <tony.luck@intel.com>
Tested-by: Will Deacon <will.deacon@arm.com> (arm64)
Tested-by: Palmer Dabbelt <palmer@sifive.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
50 files changed:
arch/Kconfig
arch/alpha/include/asm/thread_info.h
arch/arc/include/asm/thread_info.h
arch/arm/include/asm/thread_info.h
arch/arm64/include/asm/thread_info.h
arch/blackfin/include/asm/thread_info.h
arch/c6x/include/asm/thread_info.h
arch/cris/include/asm/processor.h
arch/cris/include/asm/thread_info.h
arch/frv/include/asm/thread_info.h
arch/h8300/include/asm/thread_info.h
arch/hexagon/include/asm/thread_info.h
arch/ia64/Kconfig
arch/ia64/Makefile
arch/ia64/include/asm/thread_info.h
arch/ia64/kernel/Makefile
arch/ia64/kernel/init_task.c [deleted file]
arch/ia64/kernel/vmlinux.lds.S
arch/m32r/include/asm/thread_info.h
arch/m68k/include/asm/thread_info.h
arch/metag/include/asm/thread_info.h
arch/microblaze/include/asm/thread_info.h
arch/mips/include/asm/thread_info.h
arch/mn10300/include/asm/thread_info.h
arch/nios2/include/asm/thread_info.h
arch/openrisc/include/asm/processor.h
arch/openrisc/include/asm/thread_info.h
arch/parisc/include/asm/thread_info.h
arch/powerpc/include/asm/thread_info.h
arch/riscv/include/asm/thread_info.h
arch/s390/include/asm/thread_info.h
arch/score/include/asm/thread_info.h
arch/sh/include/asm/thread_info.h
arch/sparc/include/asm/thread_info_32.h
arch/sparc/include/asm/thread_info_64.h
arch/tile/include/asm/thread_info.h
arch/um/include/asm/processor-generic.h
arch/um/include/asm/thread_info.h
arch/um/include/asm/vmlinux.lds.h [new file with mode: 0644]
arch/um/kernel/dyn.lds.S
arch/um/kernel/um_arch.c
arch/um/kernel/uml.lds.S
arch/unicore32/include/asm/thread_info.h
arch/x86/include/asm/thread_info.h
arch/xtensa/include/asm/thread_info.h
include/asm-generic/vmlinux.lds.h
include/linux/init_task.h
include/linux/sched.h
init/Makefile
init/init_task.c