diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2018-08-31 04:42:24 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2018-10-09 05:20:55 -0400 |
commit | 53c99bd665a2649341ed6aed358ab56a3eedcd00 (patch) | |
tree | b7fb2be29c66039b6f986f988e064bfdff7dd392 /include/linux/start_kernel.h | |
parent | 00e9e6645adc2c02c9ec5b42fd39d2a7f0880e6a (diff) |
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>
Diffstat (limited to 'include/linux/start_kernel.h')
-rw-r--r-- | include/linux/start_kernel.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/start_kernel.h b/include/linux/start_kernel.h index 4b268d86a784..8b369a41c03c 100644 --- a/include/linux/start_kernel.h +++ b/include/linux/start_kernel.h | |||
@@ -9,5 +9,7 @@ | |||
9 | up something else. */ | 9 | up something else. */ |
10 | 10 | ||
11 | extern asmlinkage void __init start_kernel(void); | 11 | extern asmlinkage void __init start_kernel(void); |
12 | extern void __init arch_call_rest_init(void); | ||
13 | extern void __ref rest_init(void); | ||
12 | 14 | ||
13 | #endif /* _LINUX_START_KERNEL_H */ | 15 | #endif /* _LINUX_START_KERNEL_H */ |