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:
zhuyanlin 2022-05-10 18:30:11 +08:00 committed by Abdelatif Guettouche
parent 1dc39689ff
commit f423f94d08
7 changed files with 8 additions and 8 deletions

View File

@ -107,7 +107,7 @@
/* 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)

View File

@ -299,7 +299,7 @@ void xtensa_dumpstate(void)
}
else
{
up_saveusercontext(&rtcb->xcp.regs);
up_saveusercontext(rtcb->xcp.regs);
}
/* Dump the registers (if available) */

View File

@ -139,7 +139,7 @@ void up_exit(int status)
/* 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
* software interrupts are disabled.

View File

@ -178,5 +178,5 @@ void xtensa_sig_deliver(void)
*/
board_autoled_off(LED_SIGNAL);
xtensa_context_restore(&regs);
xtensa_context_restore(regs);
}

View File

@ -96,7 +96,7 @@ int xtensa_swint(int irq, void *context, void *arg)
case SYS_save_context:
{
DEBUGASSERT(regs[REG_A3] != 0);
memcpy(*(uint32_t **)regs[REG_A3], regs, XCPTCONTEXT_SIZE);
memcpy((uint32_t *)regs[REG_A3], regs, XCPTCONTEXT_SIZE);
}
break;
@ -121,7 +121,7 @@ int xtensa_swint(int irq, void *context, void *arg)
case SYS_restore_context:
{
DEBUGASSERT(regs[REG_A3] != 0);
CURRENT_REGS = *(uint32_t **)regs[REG_A3];
CURRENT_REGS = (uint32_t *)regs[REG_A3];
}
break;

View File

@ -209,7 +209,7 @@ void IRAM_ATTR xtensa_appcpu_start(void)
* be the CPUs NULL task.
*/
xtensa_context_restore(&tcb->xcp.regs);
xtensa_context_restore(tcb->xcp.regs);
}
/****************************************************************************

View File

@ -169,7 +169,7 @@ void xtensa_appcpu_start(void)
* be the CPUs NULL task.
*/
xtensa_context_restore(&tcb->xcp.regs);
xtensa_context_restore(tcb->xcp.regs);
}
/****************************************************************************