kernel: add sys init level for SMP
This adds a sys init level which allows device and sys_init to be done after SMP initialization, z_smp_init(), when all cores are up and running. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
5539c3ed90
commit
4e1637b54e
5 changed files with 15 additions and 0 deletions
|
@ -69,6 +69,9 @@ extern "C" {
|
|||
* \li POST_KERNEL: Used for devices that require kernel services during
|
||||
* configuration.
|
||||
* \n
|
||||
* \li POST_KERNEL_SMP: Used for devices that require kernel services during
|
||||
* configuration after SMP initialization.
|
||||
* \n
|
||||
* \li APPLICATION: Used for application components (i.e. non-kernel components)
|
||||
* that need automatic configuration. These devices can use all services
|
||||
* provided by the kernel during configuration.
|
||||
|
|
|
@ -25,6 +25,10 @@ extern "C" {
|
|||
#define _SYS_INIT_LEVEL_POST_KERNEL 2
|
||||
#define _SYS_INIT_LEVEL_APPLICATION 3
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
#define _SYS_INIT_LEVEL_SMP 4
|
||||
#endif
|
||||
|
||||
/* A counter is used to avoid issues when two or more system devices
|
||||
* are declared in the same C file with the same init function.
|
||||
*/
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
DEVICE_INIT_LEVEL(PRE_KERNEL_2) \
|
||||
DEVICE_INIT_LEVEL(POST_KERNEL) \
|
||||
DEVICE_INIT_LEVEL(APPLICATION) \
|
||||
DEVICE_INIT_LEVEL(SMP) \
|
||||
__device_init_end = .; \
|
||||
DEVICE_BUSY_BITFIELD() \
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue