xen/arm: irq: Don't use _IRQ_PENDING when handling host interrupt
authorJulien Grall <julien.grall@arm.com>
Sun, 2 Jun 2019 10:26:14 +0000 (11:26 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Mon, 29 Jul 2019 20:50:44 +0000 (13:50 -0700)
commitf83a02eb819375c2ece4747ce1b90b7245723c6e
tree6b2f1d6f87211ce4b18bc20b1d1a04e556adfc69
parent663ba2ffe110fce181df3183f4f594944ce05772
xen/arm: irq: Don't use _IRQ_PENDING when handling host interrupt

While SPIs are shared between CPU, it is not possible to receive the
same interrupts on a different CPU while the interrupt is in active
state.

For host interrupt (i.e routed to Xen), the deactivation of the
interrupt is done at the end of the handling. This can alternatively be
done outside of the handler by calling gic_set_active_state().

At the moment, gic_set_active_state() is only called by the vGIC for
interrupt routed to the guest. It is hard to find a reason for Xen to
directly play with the active state for interrupt routed to Xen.

To simplify the handling of host interrupt, gic_set_activate_state() is
now restricted to interrupts routed to guest.

This means the _IRQ_PENDING logic is now unecessary on Arm as a same
interrupt can never come up while in the loop and nobody should play
with the flag behind our back.

[Stefano: improve in-code comment]

Signed-off-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
Reviewed-by: Andrii Anisov <andrii_anisov@epam.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/irq.c
xen/include/asm-arm/gic.h