]> git.baikalelectronics.ru Git - kernel.git/commit
irqchip/gic: Atomically update affinity
authorMarc Zyngier <maz@kernel.org>
Sun, 21 Jun 2020 13:43:15 +0000 (14:43 +0100)
committerMarc Zyngier <maz@kernel.org>
Sun, 21 Jun 2020 14:24:46 +0000 (15:24 +0100)
commita74a9c027d944f3a997f185659fafcbe1e2bcd9d
tree93bd22485a697d1dbba97b2829b82e03c08ae57f
parent3f888aad3d072eb95a92402644c22517e5da1e77
irqchip/gic: Atomically update affinity

The GIC driver uses a RMW sequence to update the affinity, and
relies on the gic_lock_irqsave/gic_unlock_irqrestore sequences
to update it atomically.

But these sequences only expand into anything meaningful if
the BL_SWITCHER option is selected, which almost never happens.

It also turns out that using a RMW and locks is just as silly,
as the GIC distributor supports byte accesses for the GICD_TARGETRn
registers, which when used make the update atomic by definition.

Drop the terminally broken code and replace it by a byte write.

Fixes: 3864158de553 ("irqchip/gic: Make locking a BL_SWITCHER only feature")
Cc: stable@vger.kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
drivers/irqchip/irq-gic.c