Xtensa port: Fixed memory corruption in interrupt handler exit function.
The a3 register was supposed to hold the _thread pointer but it seems that it does not in all cases. Safe to restore it from _kernel structure. Change-Id: Ie2ff6c3faf0fe70de4c5877ab59433d0c165145b Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
This commit is contained in:
parent
46c7275831
commit
b06115aa7c
1 changed files with 1 additions and 0 deletions
|
@ -175,6 +175,7 @@ _zxt_int_exit:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if XCHAL_CP_NUM > 0
|
#if XCHAL_CP_NUM > 0
|
||||||
|
l32i a3, a2, KERNEL_OFFSET(current) /* _thread := _kernel->current */
|
||||||
l32i a4, a3, THREAD_OFFSET(cpStack)
|
l32i a4, a3, THREAD_OFFSET(cpStack)
|
||||||
rsr a5, CPENABLE
|
rsr a5, CPENABLE
|
||||||
s16i a5, a4, XT_CPENABLE /* cp_state->cpenable = CPENABLE; */
|
s16i a5, a4, XT_CPENABLE /* cp_state->cpenable = CPENABLE; */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue