qemu/include/hw/intc
Peter Maydell 5255fcf8e4 nvic: Add cached vectpending_prio state
Instead of looking up the pending priority
in nvic_pending_prio(), cache it in a new state struct
field. The calculation of the pending priority given
the interrupt number is more complicated in v8M with
the security extension, so the caching will be worthwhile.

This changes nvic_pending_prio() from returning a full
(group + subpriority) priority value to returning a group
priority. This doesn't require changes to its callsites
because we use it only in comparisons of the form
  execution_prio > nvic_pending_prio()
and execution priority is always a group priority, so
a test (exec prio > full prio) is true if and only if
(execprio > group_prio).

(Architecturally the expected comparison is with the
group priority for this sort of "would we preempt" test;
we were only doing a test with a full priority as an
optimisation to avoid the mask, which is possible
precisely because the two comparisons always give the
same answer.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 1505240046-11454-5-git-send-email-peter.maydell@linaro.org
2017-09-21 16:29:27 +01:00
..
allwinner-a10-pic.h Clean up header guards that don't match their file name 2016-07-12 16:19:16 +02:00
arm_gic_common.h hw/intc/arm_gic: Add external IRQ lines for VIRQ and VFIQ 2017-01-20 11:15:09 +00:00
arm_gic.h gic: provide defines for v2/v3 targetlist sizes 2016-07-14 16:51:37 +01:00
arm_gicv3_common.h hw/intc/arm_gicv3_kvm: Add ICC_SRE_EL1 register to vmstate 2017-02-28 17:10:00 +00:00
arm_gicv3_its_common.h hw/intc/arm_gicv3_its: Implement state save/restore 2017-06-13 14:57:00 +01:00
arm_gicv3.h hw/intc/arm_gicv3: ARM GICv3 device framework 2016-06-17 15:23:51 +01:00
armv7m_nvic.h nvic: Add cached vectpending_prio state 2017-09-21 16:29:27 +01:00
aspeed_vic.h hw/intc: Add (new) ASPEED VIC device model 2016-03-16 17:42:18 +00:00
bcm2835_ic.h bcm2835_ic: add bcm2835 interrupt controller 2016-02-03 15:00:44 +00:00
bcm2836_control.h bcm2836_control: add bcm2836 ARM control logic 2016-02-03 15:00:45 +00:00
imx_avic.h i.MX: Split AVIC emulator in a header file and a source file 2015-08-13 11:26:19 +01:00
intc.h intc: add an interface to gather statistics/informations on interrupt controllers 2016-10-04 10:00:25 +02:00
mips_gic.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
realview_gic.h