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:
parent
1dc39689ff
commit
f423f94d08
@ -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)
|
||||
|
@ -299,7 +299,7 @@ void xtensa_dumpstate(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
up_saveusercontext(&rtcb->xcp.regs);
|
||||
up_saveusercontext(rtcb->xcp.regs);
|
||||
}
|
||||
|
||||
/* Dump the registers (if available) */
|
||||
|
@ -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.
|
||||
|
@ -178,5 +178,5 @@ void xtensa_sig_deliver(void)
|
||||
*/
|
||||
|
||||
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:
|
||||
{
|
||||
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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user