irqchip/gic-v4.1: Ensure mutual exclusion betwen invalidations on the same RD
authorMarc Zyngier <maz@kernel.org>
Wed, 4 Mar 2020 20:33:12 +0000 (20:33 +0000)
committerMarc Zyngier <maz@kernel.org>
Fri, 20 Mar 2020 17:48:21 +0000 (17:48 +0000)
commit9058a4e980648e7d068a7f7726a8ea4c67d0e88a
tree80a4e1431d39b6e0dcbcee6d9dad9f1b4c627a6b
parentb978c25f6ee7d4c79cbe918eed684e53887ec001
irqchip/gic-v4.1: Ensure mutual exclusion betwen invalidations on the same RD

The GICv4.1 spec says that it is CONTRAINED UNPREDICTABLE to write to
any of the GICR_INV{LPI,ALL}R registers if GICR_SYNCR.Busy == 1.

To deal with it, we must ensure that only a single invalidation can
happen at a time for a given redistributor. Add a per-RD lock to that
effect and take it around the invalidation/syncr-read to deal with this.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Link: https://lore.kernel.org/r/20200304203330.4967-6-maz@kernel.org
drivers/irqchip/irq-gic-v3-its.c
drivers/irqchip/irq-gic-v3.c
include/linux/irqchip/arm-gic-v3.h