mirror of
https://github.com/apache/nuttx.git
synced 2026-10-04 04:38:10 +00:00
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:
parent
23b40818cb
commit
17ca45e8a3
4 changed files with 14 additions and 4 deletions
|
|
@ -106,6 +106,8 @@ static void *sim_idle_trampoline(void *arg)
|
|||
|
||||
host_cpu_started();
|
||||
|
||||
sim_unlock();
|
||||
|
||||
/* The idle Loop */
|
||||
|
||||
for (; ; )
|
||||
|
|
|
|||
|
|
@ -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
|
||||
****************************************************************************/
|
||||
|
|
|
|||
|
|
@ -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 ***********************************************************/
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue