sim: fix sim smp boot regression

This commit fixes the regression from https://github.com/apache/nuttx/pull/13716

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5
2024-10-08 21:01:08 +08:00
committed by Xiang Xiao
parent 23b40818cb
commit 17ca45e8a3
4 changed files with 14 additions and 4 deletions
+2
View File
@@ -106,6 +106,8 @@ static void *sim_idle_trampoline(void *arg)
host_cpu_started();
sim_unlock();
/* The idle Loop */
for (; ; )
+10
View File
@@ -27,6 +27,7 @@
#include <stdbool.h>
#include <nuttx/arch.h>
#include <sched/sched.h>
#include <nuttx/init.h>
#include "sim_internal.h"
@@ -34,6 +35,15 @@
* Public Functions
****************************************************************************/
void sim_unlock(void)
{
/* wait until cpu0 in idle() */
while (!OSINIT_IDLELOOP());
sched_unlock();
}
/****************************************************************************
* Name: sim_doirq
****************************************************************************/
+1
View File
@@ -206,6 +206,7 @@ extern char **g_argv;
void sim_copyfullstate(xcpt_reg_t *dest, xcpt_reg_t *src);
void *sim_doirq(int irq, void *regs);
void sim_unlock(void);
/* sim_hostmisc.c ***********************************************************/
+1 -4
View File
@@ -80,10 +80,7 @@
do \
{ \
g_cpu_irqset = 0; \
SP_DMB(); \
g_cpu_irqlock = SP_UNLOCKED; \
SP_DSB(); \
SP_SEV(); \
spin_unlock_wo_note(&g_cpu_irqlock); \
} \
while (0)
#endif