mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08: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:
@@ -106,6 +106,8 @@ static void *sim_idle_trampoline(void *arg)
|
|||||||
|
|
||||||
host_cpu_started();
|
host_cpu_started();
|
||||||
|
|
||||||
|
sim_unlock();
|
||||||
|
|
||||||
/* The idle Loop */
|
/* The idle Loop */
|
||||||
|
|
||||||
for (; ; )
|
for (; ; )
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <sched/sched.h>
|
#include <sched/sched.h>
|
||||||
|
#include <nuttx/init.h>
|
||||||
|
|
||||||
#include "sim_internal.h"
|
#include "sim_internal.h"
|
||||||
|
|
||||||
@@ -34,6 +35,15 @@
|
|||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
void sim_unlock(void)
|
||||||
|
{
|
||||||
|
/* wait until cpu0 in idle() */
|
||||||
|
|
||||||
|
while (!OSINIT_IDLELOOP());
|
||||||
|
|
||||||
|
sched_unlock();
|
||||||
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: sim_doirq
|
* Name: sim_doirq
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -206,6 +206,7 @@ extern char **g_argv;
|
|||||||
|
|
||||||
void sim_copyfullstate(xcpt_reg_t *dest, xcpt_reg_t *src);
|
void sim_copyfullstate(xcpt_reg_t *dest, xcpt_reg_t *src);
|
||||||
void *sim_doirq(int irq, void *regs);
|
void *sim_doirq(int irq, void *regs);
|
||||||
|
void sim_unlock(void);
|
||||||
|
|
||||||
/* sim_hostmisc.c ***********************************************************/
|
/* sim_hostmisc.c ***********************************************************/
|
||||||
|
|
||||||
|
|||||||
+1
-4
@@ -80,10 +80,7 @@
|
|||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
g_cpu_irqset = 0; \
|
g_cpu_irqset = 0; \
|
||||||
SP_DMB(); \
|
spin_unlock_wo_note(&g_cpu_irqlock); \
|
||||||
g_cpu_irqlock = SP_UNLOCKED; \
|
|
||||||
SP_DSB(); \
|
|
||||||
SP_SEV(); \
|
|
||||||
} \
|
} \
|
||||||
while (0)
|
while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user