ARM: GIC: Allow reading pending state of a hardware IRQ
authorAndre Przywara <andre.przywara@linaro.org>
Thu, 4 Jan 2018 12:38:58 +0000 (12:38 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Mon, 26 Mar 2018 20:31:11 +0000 (13:31 -0700)
commit7356011ec2242f12caae461ed694a6f2796621f4
treeb8c36197c0f371a2849e50d38423d5d01352e212
parentba4044c10de9d2c2a4afee7bf490f483271182f2
ARM: GIC: Allow reading pending state of a hardware IRQ

To synchronize level triggered interrupts which are mapped into a guest,
we need to update the virtual line level at certain points in time.
For a hardware mapped interrupt the GIC is the only place where we can
easily access this information.
Implement a gic_hw_operations member to return the pending state of a
particular interrupt. Due to hardware limitations this only works for
private interrupts of the current CPU, so there is no CPU field in the
prototype.
This adds gicv2/3_peek_irq() helper functions, to read a bit in a bitmap
spread over several MMIO registers.

Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
Reviewed-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/gic-v2.c
xen/arch/arm/gic-v3.c
xen/include/asm-arm/gic.h