arch: arc: add the support of STACK_SENTINEL
* call the _check_stack_sentinel in unnested isr return. * for firq, _check_stack_sentinel is called in kernel isr stack because the limitation of banked register * for normal irq, _check_stak_sentinel is called in the interruptted thread stack Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
This commit is contained in:
parent
8da51ee326
commit
adf6f48e0d
2 changed files with 11 additions and 2 deletions
|
@ -123,8 +123,6 @@ firq_nest:
|
|||
|
||||
SECTION_FUNC(TEXT, _firq_exit)
|
||||
|
||||
pop sp
|
||||
|
||||
#if CONFIG_RGF_NUM_BANKS != 1
|
||||
#ifndef CONFIG_FIRQ_NO_LPCC
|
||||
/* restore lp_count, lp_start, lp_end from r23-r25 */
|
||||
|
@ -142,6 +140,10 @@ SECTION_FUNC(TEXT, _firq_exit)
|
|||
bne.d _firq_no_reschedule
|
||||
st r0, [r1]
|
||||
|
||||
#ifdef CONFIG_STACK_SENTINEL
|
||||
bl _check_stack_sentinel
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PREEMPT_ENABLED
|
||||
|
||||
mov_s r1, _kernel
|
||||
|
@ -164,6 +166,8 @@ SECTION_FUNC(TEXT, _firq_exit)
|
|||
|
||||
.balign 4
|
||||
_firq_no_reschedule:
|
||||
pop sp
|
||||
|
||||
/*
|
||||
* Keeping this code block close to those that use it allows using brxx
|
||||
* instruction instead of a pair of cmp and bxx
|
||||
|
@ -207,6 +211,7 @@ _firq_no_reschedule:
|
|||
|
||||
.balign 4
|
||||
_firq_reschedule:
|
||||
pop sp
|
||||
|
||||
#if CONFIG_RGF_NUM_BANKS != 1
|
||||
/*
|
||||
|
|
|
@ -95,6 +95,10 @@ SECTION_FUNC(TEXT, _rirq_exit)
|
|||
bne.d _rirq_return_from_rirq
|
||||
st r0, [r1]
|
||||
|
||||
#ifdef CONFIG_STACK_SENTINEL
|
||||
bl _check_stack_sentinel
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PREEMPT_ENABLED
|
||||
|
||||
mov r1, _kernel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue