Revert "arch: k210: Fix the pause handler for SMP"
This reverts commit a500bd0238
.
This commit is contained in:
parent
b237748f50
commit
37dad5dd04
|
@ -205,7 +205,6 @@ int up_cpu_paused(int cpu)
|
||||||
int riscv_pause_handler(int irq, void *c, FAR void *arg)
|
int riscv_pause_handler(int irq, void *c, FAR void *arg)
|
||||||
{
|
{
|
||||||
int cpu = up_cpu_index();
|
int cpu = up_cpu_index();
|
||||||
int ret = OK;
|
|
||||||
|
|
||||||
/* Clear machine software interrupt */
|
/* Clear machine software interrupt */
|
||||||
|
|
||||||
|
@ -218,21 +217,10 @@ int riscv_pause_handler(int irq, void *c, FAR void *arg)
|
||||||
|
|
||||||
if (spin_islocked(&g_cpu_paused[cpu]))
|
if (spin_islocked(&g_cpu_paused[cpu]))
|
||||||
{
|
{
|
||||||
/* NOTE: up_cpu_paused() needs to be executed in a critical section
|
return up_cpu_paused(cpu);
|
||||||
* to ensure that this CPU holds g_cpu_irqlock. However, adding
|
|
||||||
* a critical section in up_cpu_paused() is not a good idea,
|
|
||||||
* because it is also called in enter_critical_section() to break
|
|
||||||
* a deadlock
|
|
||||||
*/
|
|
||||||
|
|
||||||
irqstate_t flags = enter_critical_section();
|
|
||||||
|
|
||||||
ret = up_cpu_paused(cpu);
|
|
||||||
|
|
||||||
leave_critical_section(flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|
Loading…
Reference in New Issue