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:
Xiang Xiao 2021-07-16 23:02:57 +08:00 committed by Masayuki Ishikawa
parent 98b5724b59
commit 4444c13c14
4 changed files with 4 additions and 14 deletions

View File

@ -114,7 +114,7 @@ void up_irqinitialize(void)
#ifdef CONFIG_SMP
/* Register the pause handler */
up_cpu_set_pause_handler(SIGUSR1);
up_init_ipi(SIGUSR1);
#endif
}

View File

@ -173,7 +173,7 @@ void sim_send_ipi(int cpu);
#ifdef CONFIG_SMP
void up_cpu_started(void);
int up_cpu_set_pause_handler(int irq);
int up_init_ipi(int irq);
#endif
/* up_oneshot.c *************************************************************/

View File

@ -51,12 +51,6 @@ struct sim_cpuinfo_s
static pthread_key_t g_cpu_key;
static pthread_t g_cpu_thread[CONFIG_SMP_NCPUS];
/****************************************************************************
* NuttX domain function prototypes
****************************************************************************/
void up_irqinitialize(void);
/****************************************************************************
* Private Functions
****************************************************************************/
@ -96,10 +90,6 @@ static void *sim_idle_trampoline(void *arg)
return NULL;
}
/* Initialize IRQ */
up_irqinitialize();
/* Let up_cpu_start() continue */
pthread_mutex_lock(&cpuinfo->cpu_init_lock);

View File

@ -273,7 +273,7 @@ int up_cpu_start(int cpu)
}
/****************************************************************************
* Name: up_cpu_set_pause_handler
* Name: up_init_ipi
*
* Description:
* 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.
****************************************************************************/
int up_cpu_set_pause_handler(int irq)
int up_init_ipi(int irq)
{
up_enable_irq(irq);
return irq_attach(irq, sim_cpupause_handler, NULL);