irqchip/gic-v3: Fix selection of partition domain for EPPIs
authorJames Morse <james.morse@arm.com>
Thu, 29 Jul 2021 17:27:48 +0000 (17:27 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 12 Aug 2021 07:11:03 +0000 (08:11 +0100)
commitd753f849bf487faffd05898e6a8e5aa9d146cb50
treeefa56fb9fdedf88166328dd6cdff4d8348bb9c8a
parentbfa80ee9ce6e2f18da76459c3dd7b0ad57fb2c20
irqchip/gic-v3: Fix selection of partition domain for EPPIs

commit 5f51f803826e ("irqchip/gic-v3: Add EPPI range support") added
GIC_IRQ_TYPE_PARTITION support for EPPI to gic_irq_domain_translate(),
and commit 52085d3f2028 ("irqchip/gic-v3: Dynamically allocate PPI
partition descriptors") made the gic_data.ppi_descs array big enough for
EPPI, but neither gic_irq_domain_select() nor partition_domain_translate()
were updated.

This means partitions are created by partition_create_desc() for the
EPPI range, but can't be registered as they will always match the root
domain and map to the summary interrupt.

Update gic_irq_domain_select() to match PPI and EPPI. The fwspec for
PPI and EPPI both start from 0. Use gic_irq_domain_translate() to find
the hwirq from the fwspec, then convert this to a ppi index.

Reported-by: Valentin Schneider <valentin.schneider@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210729172748.28841-3-james.morse@arm.com
drivers/irqchip/irq-gic-v3.c