kernel: Move SMP initialization to start of main thread
The smp_init() call was too early. Device and subsystem initialization doesn't happen until after the main thread starts running. Starting extra CPUs and allowing them to schedule threads before their drivers are alive is a bad idea, even if it works in a unit test. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
d171568582
commit
eb258706e0
1 changed files with 3 additions and 4 deletions
|
@ -238,6 +238,9 @@ static void bg_thread_main(void *unused1, void *unused2, void *unused3)
|
|||
|
||||
_init_static_threads();
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
smp_init();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BOOT_TIME_MEASUREMENT
|
||||
/* record timestamp for kernel's _main() function */
|
||||
|
@ -441,10 +444,6 @@ FUNC_NORETURN void _Cstart(void)
|
|||
__stack_chk_guard = (void *)sys_rand32_get();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
smp_init();
|
||||
#endif
|
||||
|
||||
/* display boot banner */
|
||||
|
||||
switch_to_main_thread();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue