tests: kernel: interrupt: fix gic sgi priority

GICC_BPR has minimum legal values in secure and non-secure states.
'3' is the minimum BPR value leading to group and sub-group priority
as 'gggg.ssss'. In order to make an IRQ preemptible they need to
be in different priority group.

Hence to be generic priority values should be above '0x0f'.

IRQ0 - default priority  (low prio)
IRQ1 - 0x0   (highest prio)

Signed-off-by: Sandeep Tripathy <sandeep.tripathy@broadcom.com>
This commit is contained in:
Sandeep Tripathy 2020-06-12 13:46:49 +05:30 committed by Anas Nashif
commit f54c57effe
2 changed files with 10 additions and 2 deletions

View file

@ -62,6 +62,7 @@ static inline void trigger_irq(int irq)
#elif defined(CONFIG_GIC)
#include <drivers/interrupt_controller/gic.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
static inline void trigger_irq(int irq)
{

View file

@ -47,8 +47,15 @@
#define IRQ0_LINE 14
#define IRQ1_LINE 15
#define IRQ0_PRIO 2
#define IRQ1_PRIO 1
/*
* Choose lower prio for IRQ0 and higher priority for IRQ1
* Minimum legal value of GICC BPR is '3' ie <gggg.ssss>
* Hence choosing default priority and highest possible priority
* '0x0' as the priorities so that the preemption rule applies
* generically to all GIC versions and security states.
*/
#define IRQ0_PRIO IRQ_DEFAULT_PRIORITY
#define IRQ1_PRIO 0x0
#else
/*
* For all the other platforms, use the last two available IRQ lines for