]> git.baikalelectronics.ru Git - kernel.git/commit
init: add arch_call_rest_init to allow stack switching
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 31 Aug 2018 08:42:24 +0000 (10:42 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 9 Oct 2018 09:20:55 +0000 (11:20 +0200)
commita47d3dbfe316a68a266a2b1d65a0c2986ab0b612
treeb7fb2be29c66039b6f986f988e064bfdff7dd392
parentc393aa179c21131eb4a0431c5f35cbabf82f5657
init: add arch_call_rest_init to allow stack switching

With CONFIG_VMAP_STACK=y the kernel stack of all tasks should be
allocated in the vmalloc space. The initial stack used for all
the early init code is in the init_thread_union. To be able to
switch from this early stack to a properly allocated stack
from vmalloc the architecture needs a switch-over point.

Introduce the arch_call_rest_init() function with a weak definition
in init/main.c with the only purpose to call rest_init() from the
end of start_kernel(). The architecture override can then do the
necessary magic to switch to the new vmalloc'ed stack.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
include/linux/start_kernel.h
init/main.c