arm/arm64: gic: Make check_acked() more generic
Testing that an interrupt is received as expected is done in three places: in check_ipi_sender(), check_irqnr() and check_acked(). check_irqnr() compares the interrupt ID with IPI_IRQ and records a failure in bad_irq, and check_ipi_sender() compares the sender with IPI_SENDER and writes to bad_sender when they don't match. Let's move all the checks to check_acked() by renaming bad_sender->irq_sender and bad_irq->irq_number and changing their semantics so they record the interrupt sender, respectively the irq number. check_acked() now takes two new parameters: the expected interrupt number and sender. This has two distinct advantages: 1. check_acked() and ipi_handler() can now be used for interrupts other than IPIs. 2. Correctness checks are consolidated in one function. CC: Andre Przywara <andre.przywara@arm.com> Reviewed-by:Eric Auger <eric.auger@redhat.com> Signed-off-by:
Alexandru Elisei <alexandru.elisei@arm.com>
Loading
Please register or sign in to comment