arch: arc: Add FIRQ option

Add FIRQ option and change the _isr_wrapper. Currently, firq is
enabled by default, but in some arc configuration, firq can be
disabled.

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
This commit is contained in:
Wayne Ren 2017-11-29 16:55:18 +08:00 committed by Anas Nashif
commit 52e4c197f3
3 changed files with 19 additions and 1 deletions

View file

@ -89,6 +89,17 @@ config RGF_NUM_BANKS
register bank, the fast interrupt handler must save
and restore general purpose registers.
config ARC_FIRQ
bool
prompt "FIRQ enable"
default y
help
Fast interrupts are supported (FIRQ). If FIRQ enabled, for interrupts
with highest priority, status32 and pc will be saved in aux regs,
other regs will be saved according to the number of register bank;
If FIRQ is disabled, the handle of interrupts with highest priority
will be same with other interrupts.
config ARC_STACK_CHECKING
bool
default y if HW_STACK_PROTECTION

View file

@ -2,7 +2,6 @@ zephyr_sources(
thread.c
thread_entry_wrapper.S
cpu_idle.S
fast_irq.S
fatal.c
fault.c
fault_s.S
@ -18,6 +17,8 @@ zephyr_sources(
vector_table.c
)
zephyr_sources_ifdef(CONFIG_ARC_FIRQ fast_irq.S)
zephyr_sources_if_kconfig(irq_offload.c)
zephyr_sources_ifdef(CONFIG_ATOMIC_OPERATIONS_CUSTOM atomic.c)
add_subdirectory_ifdef(CONFIG_CPU_HAS_MPU mpu)

View file

@ -229,6 +229,7 @@ From RIRQ:
*/
SECTION_FUNC(TEXT, _isr_wrapper)
#if CONFIG_ARC_FIRQ
#if CONFIG_RGF_NUM_BANKS == 1
st r0,[saved_r0]
#endif
@ -286,6 +287,11 @@ rirq_path:
mov.nz r2, _rirq_enter
j_s [r2]
#endif
#else
mov r3, _rirq_exit
mov r2, _rirq_enter
j_s [r2]
#endif
#ifdef CONFIG_KERNEL_EVENT_LOGGER_SLEEP
GTEXT(_sys_k_event_logger_exit_sleep)