arm: tc32 nested interrupts are not supported

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5 2024-09-23 09:24:53 +08:00 committed by Xiang Xiao
parent ee81823546
commit 4ecb6efee8

View file

@ -64,21 +64,15 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
PANIC(); PANIC();
#else #else
/* Nested interrupts are not supported in this implementation. If you /* Nested interrupts are not supported */
* want to implement nested interrupts, you would have to (1) change the
* way that current_regs is handled and (2) the design associated with DEBUGASSERT(up_current_regs() == NULL);
* CONFIG_ARCH_INTERRUPTSTACK.
*/
/* Current regs non-zero indicates that we are processing an interrupt; /* Current regs non-zero indicates that we are processing an interrupt;
* current_regs is also used to manage interrupt level context switches. * current_regs is also used to manage interrupt level context switches.
*/ */
if (up_current_regs() == NULL) up_set_current_regs(regs);
{
up_set_current_regs(regs);
regs = NULL;
}
tcb->xcp.regs = regs; tcb->xcp.regs = regs;
@ -97,17 +91,15 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
* switch occurred during interrupt processing. * switch occurred during interrupt processing.
*/ */
if (regs == NULL) if (regs != tcb->xcp.regs)
{ {
if (regs != tcb->xcp.regs) regs = tcb->xcp.regs;
{
regs = tcb->xcp.regs;
}
/* Update the current_regs to NULL. */
up_set_current_regs(NULL);
} }
/* Update the current_regs to NULL. */
up_set_current_regs(NULL);
#endif #endif
board_autoled_off(LED_INIRQ); board_autoled_off(LED_INIRQ);