From 2e82c361f73b2119613c3571c48faae8ec41d4eb Mon Sep 17 00:00:00 2001 From: arvinzzz Date: Thu, 3 Jun 2021 09:40:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BC=80=E6=9C=BA?= =?UTF-8?q?=E6=A6=82=E7=8E=87=E6=8C=82=E6=AD=BB=20close=EF=BC=9A#I3SWY2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ied2a5828ffb682903e291dab4088020033d79230 Signed-off-by: arvinzzz --- kernel/common/los_config.c | 8 +++++--- kernel/common/los_init.c | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/kernel/common/los_config.c b/kernel/common/los_config.c index b894e796..c59fe917 100644 --- a/kernel/common/los_config.c +++ b/kernel/common/los_config.c @@ -231,9 +231,7 @@ LITE_OS_SEC_TEXT_INIT INT32 OsMain(VOID) if (ret != LOS_OK) { return ret; } -#if (LOSCFG_KERNEL_SMP == 1) - release_secondary_cores(); -#endif + OsInitCall(LOS_INIT_LEVEL_VM_COMPLETE); ret = OsIpcInit(); @@ -267,6 +265,10 @@ LITE_OS_SEC_TEXT_INIT INT32 OsMain(VOID) OsInitCall(LOS_INIT_LEVEL_KMOD_EXTENDED); +#if (LOSCFG_KERNEL_SMP == 1) + release_secondary_cores(); +#endif + OsInitCall(LOS_INIT_LEVEL_KMOD_TASK); #ifdef LOS_INIT_STATISTICS diff --git a/kernel/common/los_init.c b/kernel/common/los_init.c index 6ba26aa9..0dc36261 100644 --- a/kernel/common/los_init.c +++ b/kernel/common/los_init.c @@ -72,7 +72,7 @@ STATIC VOID InitLevelCall(const CHAR *name, const UINT32 level, struct ModuleIni g_initCurrentLevel = level; g_initCurrentModule = initLevelList[level]; } else { - while (g_initCurrentLevel != level) { + while (g_initCurrentLevel < level) { } } @@ -106,7 +106,7 @@ STATIC VOID InitLevelCall(const CHAR *name, const UINT32 level, struct ModuleIni #endif } while (1); - if (level >= LOS_INIT_LEVEL_VM_COMPLETE) { + if (level >= LOS_INIT_LEVEL_KMOD_TASK) { LOS_AtomicInc(&g_initCount); while ((LOS_AtomicRead(&g_initCount) % LOSCFG_KERNEL_CORE_NUM) != 0) { }