gicv2:g_gic_init_done need to be protect
Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
parent
cd88cb1e48
commit
c16fd8c911
@ -30,6 +30,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
|
#include <nuttx/spinlock.h>
|
||||||
#include <arch/irq.h>
|
#include <arch/irq.h>
|
||||||
|
|
||||||
#include "arm_internal.h"
|
#include "arm_internal.h"
|
||||||
@ -68,7 +69,11 @@ static volatile cpu_set_t g_gic_init_done;
|
|||||||
#if defined(CONFIG_SMP) && CONFIG_SMP_NCPUS > 1
|
#if defined(CONFIG_SMP) && CONFIG_SMP_NCPUS > 1
|
||||||
static void arm_gic_init_done(void)
|
static void arm_gic_init_done(void)
|
||||||
{
|
{
|
||||||
|
irqstate_t flags;
|
||||||
|
|
||||||
|
flags = spin_lock_irqsave(NULL);
|
||||||
CPU_SET(up_cpu_index(), &g_gic_init_done);
|
CPU_SET(up_cpu_index(), &g_gic_init_done);
|
||||||
|
spin_unlock_irqrestore(NULL, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void arm_gic_wait_done(cpu_set_t cpuset)
|
static void arm_gic_wait_done(cpu_set_t cpuset)
|
||||||
|
Loading…
Reference in New Issue
Block a user