mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
![Martin Schwidefsky](/assets/img/avatar_default.png)
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>
15 lines
415 B
C
15 lines
415 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_START_KERNEL_H
|
|
#define _LINUX_START_KERNEL_H
|
|
|
|
#include <linux/linkage.h>
|
|
#include <linux/init.h>
|
|
|
|
/* Define the prototype for start_kernel here, rather than cluttering
|
|
up something else. */
|
|
|
|
extern asmlinkage void __init start_kernel(void);
|
|
extern void __init arch_call_rest_init(void);
|
|
extern void __ref rest_init(void);
|
|
|
|
#endif /* _LINUX_START_KERNEL_H */
|