Revert "irq: remove restore_critical_section in irq"
This reverts commit f6a9e9105712833c1074ffe88f8452def2e94dcf.
This commit is contained in:
parent
80fdf95790
commit
04c19bb1c9
@ -79,6 +79,7 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
|
||||
|
||||
g_running_tasks[this_cpu()] = this_task();
|
||||
|
||||
restore_critical_section();
|
||||
regs = (uint32_t *)CURRENT_REGS;
|
||||
}
|
||||
|
||||
|
@ -92,6 +92,7 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
|
||||
|
||||
g_running_tasks[this_cpu()] = this_task();
|
||||
|
||||
restore_critical_section();
|
||||
regs = (uint32_t *)CURRENT_REGS;
|
||||
}
|
||||
|
||||
|
@ -79,6 +79,7 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
|
||||
|
||||
g_running_tasks[this_cpu()] = this_task();
|
||||
|
||||
restore_critical_section();
|
||||
regs = (uint32_t *)CURRENT_REGS;
|
||||
}
|
||||
|
||||
|
@ -71,6 +71,7 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
|
||||
|
||||
g_running_tasks[this_cpu()] = this_task();
|
||||
|
||||
restore_critical_section();
|
||||
regs = (uint32_t *)CURRENT_REGS;
|
||||
}
|
||||
|
||||
|
@ -128,6 +128,7 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
|
||||
|
||||
g_running_tasks[this_cpu()] = this_task();
|
||||
|
||||
restore_critical_section();
|
||||
regs = (uint32_t *)CURRENT_REGS;
|
||||
}
|
||||
|
||||
|
@ -64,6 +64,7 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
|
||||
|
||||
if (regs != CURRENT_REGS)
|
||||
{
|
||||
restore_critical_section();
|
||||
regs = (uint32_t *)CURRENT_REGS;
|
||||
}
|
||||
|
||||
|
@ -98,6 +98,7 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
|
||||
|
||||
if (regs != CURRENT_REGS)
|
||||
{
|
||||
restore_critical_section();
|
||||
regs = (uint32_t *)CURRENT_REGS;
|
||||
}
|
||||
|
||||
|
@ -99,6 +99,9 @@ uint64_t *arm64_doirq(int irq, uint64_t * regs)
|
||||
|
||||
g_running_tasks[this_cpu()] = this_task();
|
||||
|
||||
/* Restore the cpu lock */
|
||||
|
||||
restore_critical_section();
|
||||
regs = (uint64_t *)CURRENT_REGS;
|
||||
}
|
||||
|
||||
|
@ -85,6 +85,7 @@ uint32_t *ceva_doirq(int irq, uint32_t *regs)
|
||||
|
||||
g_running_tasks[this_cpu()] = this_task();
|
||||
|
||||
restore_critical_section();
|
||||
regs = CURRENT_REGS;
|
||||
}
|
||||
|
||||
|
@ -109,6 +109,10 @@ uintreg_t *riscv_doirq(int irq, uintreg_t *regs)
|
||||
|
||||
g_running_tasks[this_cpu()] = this_task();
|
||||
|
||||
/* Restore the cpu lock */
|
||||
|
||||
restore_critical_section();
|
||||
|
||||
/* If a context switch occurred while processing the interrupt then
|
||||
* CURRENT_REGS may have change value. If we return any value
|
||||
* different from the input regs, then the lower level will know
|
||||
|
@ -75,6 +75,10 @@ void up_switch_context(struct tcb_s *tcb, struct tcb_s *rtcb)
|
||||
|
||||
nxsched_resume_scheduler(tcb);
|
||||
|
||||
/* Restore the cpu lock */
|
||||
|
||||
restore_critical_section();
|
||||
|
||||
/* Then switch contexts */
|
||||
|
||||
sim_restorestate(tcb->xcp.regs);
|
||||
|
@ -118,6 +118,13 @@ uint32_t *sparc_doirq(int irq, uint32_t *regs)
|
||||
regs = (uint32_t *)((uint32_t)CURRENT_REGS -
|
||||
CPU_MINIMUM_STACK_FRAME_SIZE);
|
||||
|
||||
/* Restore the cpu lock */
|
||||
|
||||
if (regs != CURRENT_REGS)
|
||||
{
|
||||
restore_critical_section();
|
||||
}
|
||||
|
||||
/* Set CURRENT_REGS to NULL to indicate that we are no longer in an
|
||||
* interrupt handler.
|
||||
*/
|
||||
|
@ -94,6 +94,7 @@ uint32_t *xtensa_irq_dispatch(int irq, uint32_t *regs)
|
||||
|
||||
if (regs != CURRENT_REGS)
|
||||
{
|
||||
restore_critical_section();
|
||||
regs = (uint32_t *)CURRENT_REGS;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user