arch: arc: the caculation of exception stack is wrong

after appling the new "_get_curr_cpu_irq_stack" in _exc_entry,
the caculation of exception stack is wrong, this will
cause stack overflow, make the exception handling corrupt.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
This commit is contained in:
Wayne Ren 2019-08-09 10:00:42 +08:00 committed by Ioannis Glaropoulos
commit 0757583892

View file

@ -65,9 +65,9 @@ _exc_entry:
* and exception is raised, then here it's guaranteed that * and exception is raised, then here it's guaranteed that
* exception handling has necessary stack to use * exception handling has necessary stack to use
*/ */
mov_s ilink, sp mov ilink, sp
_get_curr_cpu_irq_stack sp _get_curr_cpu_irq_stack sp
add sp, sp, EXCEPTION_STACK_SIZE sub sp, sp, (CONFIG_ISR_STACK_SIZE - EXCEPTION_STACK_SIZE)
/* /*
* save caller saved registers * save caller saved registers