From 146c7e8c7e0a6e6a11867f798028f911719c3f3f Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Tue, 13 Aug 2019 23:52:36 +0800 Subject: [PATCH] arch: arc: secure world only check secure interrupt * in arc secureshield interrupts can be configured as secure or normal * in sw design, high interrupt priorites are allocated to secure world, low priorities are allocated to normal world. * secure interrupt > secure thread > normal interrupt > normal thead So, here secure world/firmware only checks secure interrupt priorities Signed-off-by: Wayne Ren --- arch/arc/include/swap_macros.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arc/include/swap_macros.h b/arch/arc/include/swap_macros.h index 622a719b253..a13114787a2 100644 --- a/arch/arc/include/swap_macros.h +++ b/arch/arc/include/swap_macros.h @@ -300,7 +300,11 @@ */ .macro _check_nest_int_by_irq_act reg1, reg2 lr \reg1, [_ARC_V2_AUX_IRQ_ACT] +#ifdef CONFIG_ARC_SECURE_FIRMWARE + and \reg1, \reg1, ((1 << ARC_N_IRQ_START_LEVEL) - 1) +#else and \reg1, \reg1, 0xffff +#endif ffs \reg2, \reg1 fls \reg1, \reg1 cmp \reg1, \reg2