mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
arch:xtensa: modify xtensa_context_save/restore function
with FPU registers in xcp context, use pointer instead of double pointer Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
This commit is contained in:
committed by
Abdelatif Guettouche
parent
1dc39689ff
commit
f423f94d08
@@ -107,7 +107,7 @@
|
|||||||
|
|
||||||
/* SYS call 1:
|
/* SYS call 1:
|
||||||
*
|
*
|
||||||
* void xtensa_context_restore(uint32_t **restoreregs) noreturn_function;
|
* void xtensa_context_restore(uint32_t *restoreregs) noreturn_function;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SYS_restore_context (1)
|
#define SYS_restore_context (1)
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ void xtensa_dumpstate(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
up_saveusercontext(&rtcb->xcp.regs);
|
up_saveusercontext(rtcb->xcp.regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dump the registers (if available) */
|
/* Dump the registers (if available) */
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ void up_exit(int status)
|
|||||||
|
|
||||||
/* Then switch contexts */
|
/* Then switch contexts */
|
||||||
|
|
||||||
xtensa_context_restore(&tcb->xcp.regs);
|
xtensa_context_restore(tcb->xcp.regs);
|
||||||
|
|
||||||
/* xtensa_context_restore() should not return but could if the
|
/* xtensa_context_restore() should not return but could if the
|
||||||
* software interrupts are disabled.
|
* software interrupts are disabled.
|
||||||
|
|||||||
@@ -178,5 +178,5 @@ void xtensa_sig_deliver(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
board_autoled_off(LED_SIGNAL);
|
board_autoled_off(LED_SIGNAL);
|
||||||
xtensa_context_restore(®s);
|
xtensa_context_restore(regs);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ int xtensa_swint(int irq, void *context, void *arg)
|
|||||||
case SYS_save_context:
|
case SYS_save_context:
|
||||||
{
|
{
|
||||||
DEBUGASSERT(regs[REG_A3] != 0);
|
DEBUGASSERT(regs[REG_A3] != 0);
|
||||||
memcpy(*(uint32_t **)regs[REG_A3], regs, XCPTCONTEXT_SIZE);
|
memcpy((uint32_t *)regs[REG_A3], regs, XCPTCONTEXT_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -121,7 +121,7 @@ int xtensa_swint(int irq, void *context, void *arg)
|
|||||||
case SYS_restore_context:
|
case SYS_restore_context:
|
||||||
{
|
{
|
||||||
DEBUGASSERT(regs[REG_A3] != 0);
|
DEBUGASSERT(regs[REG_A3] != 0);
|
||||||
CURRENT_REGS = *(uint32_t **)regs[REG_A3];
|
CURRENT_REGS = (uint32_t *)regs[REG_A3];
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ void IRAM_ATTR xtensa_appcpu_start(void)
|
|||||||
* be the CPUs NULL task.
|
* be the CPUs NULL task.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
xtensa_context_restore(&tcb->xcp.regs);
|
xtensa_context_restore(tcb->xcp.regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ void xtensa_appcpu_start(void)
|
|||||||
* be the CPUs NULL task.
|
* be the CPUs NULL task.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
xtensa_context_restore(&tcb->xcp.regs);
|
xtensa_context_restore(tcb->xcp.regs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user