arch/sim: The second CPU shouldn't call up_irqinitialize
since the signal handler the process concept Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
98b5724b59
commit
4444c13c14
@ -114,7 +114,7 @@ void up_irqinitialize(void)
|
|||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
/* Register the pause handler */
|
/* Register the pause handler */
|
||||||
|
|
||||||
up_cpu_set_pause_handler(SIGUSR1);
|
up_init_ipi(SIGUSR1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ void sim_send_ipi(int cpu);
|
|||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
void up_cpu_started(void);
|
void up_cpu_started(void);
|
||||||
int up_cpu_set_pause_handler(int irq);
|
int up_init_ipi(int irq);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* up_oneshot.c *************************************************************/
|
/* up_oneshot.c *************************************************************/
|
||||||
|
@ -51,12 +51,6 @@ struct sim_cpuinfo_s
|
|||||||
static pthread_key_t g_cpu_key;
|
static pthread_key_t g_cpu_key;
|
||||||
static pthread_t g_cpu_thread[CONFIG_SMP_NCPUS];
|
static pthread_t g_cpu_thread[CONFIG_SMP_NCPUS];
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* NuttX domain function prototypes
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
void up_irqinitialize(void);
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -96,10 +90,6 @@ static void *sim_idle_trampoline(void *arg)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize IRQ */
|
|
||||||
|
|
||||||
up_irqinitialize();
|
|
||||||
|
|
||||||
/* Let up_cpu_start() continue */
|
/* Let up_cpu_start() continue */
|
||||||
|
|
||||||
pthread_mutex_lock(&cpuinfo->cpu_init_lock);
|
pthread_mutex_lock(&cpuinfo->cpu_init_lock);
|
||||||
|
@ -273,7 +273,7 @@ int up_cpu_start(int cpu)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_cpu_set_pause_handler
|
* Name: up_init_ipi
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Attach the CPU pause request interrupt to the NuttX logic.
|
* Attach the CPU pause request interrupt to the NuttX logic.
|
||||||
@ -285,7 +285,7 @@ int up_cpu_start(int cpu)
|
|||||||
* On success returns OK (0), otherwise a negative value.
|
* On success returns OK (0), otherwise a negative value.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int up_cpu_set_pause_handler(int irq)
|
int up_init_ipi(int irq)
|
||||||
{
|
{
|
||||||
up_enable_irq(irq);
|
up_enable_irq(irq);
|
||||||
return irq_attach(irq, sim_cpupause_handler, NULL);
|
return irq_attach(irq, sim_cpupause_handler, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user